forked from openedx/credentials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [ACI-222] feature flag for badges (#52)
- Loading branch information
1 parent
337ff7a
commit 39bc6e7
Showing
4 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
""" | ||
Admin section configuration. | ||
""" | ||
|
||
from .toggles import is_badges_enabled | ||
|
||
if is_badges_enabled(): | ||
# TODO: Define registering admin classes here `admin.site.register(...)` | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
from django.apps import AppConfig | ||
|
||
from .toggles import is_badges_enabled | ||
from .toggles import check_badges_enabled | ||
|
||
|
||
class BadgesConfig(AppConfig): | ||
name = "credentials.apps.badges" | ||
verbose_name = "Badges" | ||
|
||
@check_badges_enabled | ||
def ready(self): | ||
""" | ||
Performs initial registrations for checks, signals, etc. | ||
""" | ||
if is_badges_enabled(): | ||
from . import signals # pylint: disable=unused-import,import-outside-toplevel | ||
from . checks import badges_checks # pylint: disable=unused-import,import-outside-toplevel | ||
from . import signals # pylint: disable=unused-import,import-outside-toplevel | ||
from . checks import badges_checks # pylint: disable=unused-import,import-outside-toplevel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
""" | ||
URLs for badges. | ||
""" | ||
urlpatterns = [] | ||
|
||
from .toggles import is_badges_enabled | ||
|
||
urlpatterns = [] if not is_badges_enabled else [ | ||
# Define urls here | ||
] |