Skip to content

Commit

Permalink
feat: [ACI-209] init new badges app
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo-kh committed Jan 12, 2024
1 parent b24dca6 commit 27f397b
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 0 deletions.
Empty file.
3 changes: 3 additions & 0 deletions credentials/apps/badges/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Admin section configuration.
"""
29 changes: 29 additions & 0 deletions credentials/apps/badges/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from django.apps import AppConfig
from credentials.apps.plugins.constants import (
PluginURLs,
PluginSettings,
SettingsType,
PROJECT_TYPE,
)


class BadgesConfig(AppConfig):
name = "credentials.apps.badges"
verbose_name = "Badges"

plugin_app = {
PluginURLs.CONFIG: {
PROJECT_TYPE: {
PluginURLs.NAMESPACE: 'badges',
PluginURLs.REGEX: 'badges/',
PluginURLs.RELATIVE_PATH: 'urls',
}
},
PluginSettings.CONFIG: {
PROJECT_TYPE: {
SettingsType.BASE: {PluginSettings.RELATIVE_PATH: 'settings.base'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: 'settings.production'},
SettingsType.TEST: {PluginSettings.RELATIVE_PATH: 'settings.test'},
},
}
}
3 changes: 3 additions & 0 deletions credentials/apps/badges/checks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Badges checks
"""
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions credentials/apps/badges/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Badges DB models.
"""
Empty file.
6 changes: 6 additions & 0 deletions credentials/apps/badges/settings/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""
Badges base settings.
"""

def plugin_settings(settings): # pylint: disable=unused-argument
pass
6 changes: 6 additions & 0 deletions credentials/apps/badges/settings/production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""
Badges production settings.
"""

def plugin_settings(settings): # pylint: disable=unused-argument
pass
6 changes: 6 additions & 0 deletions credentials/apps/badges/settings/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""
Badges test settings.
"""

def plugin_settings(settings): # pylint: disable=unused-argument
pass
Empty file.
3 changes: 3 additions & 0 deletions credentials/apps/badges/toggles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Toggles for badges app.
"""
4 changes: 4 additions & 0 deletions credentials/apps/badges/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""
URLs for badges.
"""
urlpatterns = []
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,27 @@ lines_after_imports = 2
combine_as_imports = true
skip = ["migrations", "settings"]
include_trailing_comma = true

[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "credentials"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Framework :: Django :: 3",
]
dynamic = ["version", "dependencies", "optional-dependencies"]

[tool.setuptools]
packages = ["credentials"]

[tool.setuptools.dynamic]
dependencies = { file = "requirements/all.txt" }

[project.entry-points."credentials.djangoapp"]
badges = "credentials.apps.badges.apps:BadgesConfig"

0 comments on commit 27f397b

Please sign in to comment.