django-daisy-theme 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_daisy_theme/__init__.py +2 -0
- django_daisy_theme/apps.py +6 -0
- django_daisy_theme/context_processors.py +13 -0
- django_daisy_theme/settings.py +45 -0
- django_daisy_theme/static/django_daisy_theme/css/daisy-theme.min.css +11 -0
- django_daisy_theme/static/django_daisy_theme/css/fonts.css +68 -0
- django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Bold.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Medium.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Regular.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Bold.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Medium.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Regular.woff2 +0 -0
- django_daisy_theme/static/django_daisy_theme/img/logo.svg +14 -0
- django_daisy_theme/static/django_daisy_theme/js/alpine.min.js +5 -0
- django_daisy_theme/static/django_daisy_theme/js/daisy-theme.js +100 -0
- django_daisy_theme/static/django_daisy_theme/js/select2-init.js +202 -0
- django_daisy_theme/templates/admin/404.html +27 -0
- django_daisy_theme/templates/admin/500.html +27 -0
- django_daisy_theme/templates/admin/actions.html +49 -0
- django_daisy_theme/templates/admin/auth/user/change_password.html +182 -0
- django_daisy_theme/templates/admin/base.html +150 -0
- django_daisy_theme/templates/admin/base_site.html +21 -0
- django_daisy_theme/templates/admin/change_form.html +107 -0
- django_daisy_theme/templates/admin/change_list.html +187 -0
- django_daisy_theme/templates/admin/change_list_results.html +69 -0
- django_daisy_theme/templates/admin/delete_confirmation.html +48 -0
- django_daisy_theme/templates/admin/delete_selected_confirmation.html +50 -0
- django_daisy_theme/templates/admin/edit_inline/stacked.html +67 -0
- django_daisy_theme/templates/admin/edit_inline/tabular.html +107 -0
- django_daisy_theme/templates/admin/filter.html +21 -0
- django_daisy_theme/templates/admin/includes/breadcrumbs.html +36 -0
- django_daisy_theme/templates/admin/includes/fieldset.html +102 -0
- django_daisy_theme/templates/admin/includes/navbar.html +91 -0
- django_daisy_theme/templates/admin/includes/sidebar.html +106 -0
- django_daisy_theme/templates/admin/includes/stats_cards.html +46 -0
- django_daisy_theme/templates/admin/includes/theme_toggle.html +93 -0
- django_daisy_theme/templates/admin/index.html +170 -0
- django_daisy_theme/templates/admin/login.html +140 -0
- django_daisy_theme/templates/admin/object_history.html +166 -0
- django_daisy_theme/templates/admin/pagination.html +27 -0
- django_daisy_theme/templates/admin/submit_line.html +64 -0
- django_daisy_theme/templates/registration/password_change_done.html +46 -0
- django_daisy_theme/templates/registration/password_change_form.html +161 -0
- django_daisy_theme/templatetags/__init__.py +3 -0
- django_daisy_theme/templatetags/daisy_theme.py +142 -0
- django_daisy_theme-0.1.0.dist-info/METADATA +92 -0
- django_daisy_theme-0.1.0.dist-info/RECORD +50 -0
- django_daisy_theme-0.1.0.dist-info/WHEEL +5 -0
- django_daisy_theme-0.1.0.dist-info/licenses/LICENSE +21 -0
- django_daisy_theme-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from django.utils import translation
|
|
2
|
+
from django_daisy_theme.settings import get_theme_config
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def daisy_theme_context(request):
|
|
6
|
+
"""
|
|
7
|
+
Injects daisy_theme configuration into the template context.
|
|
8
|
+
"""
|
|
9
|
+
return {
|
|
10
|
+
"daisy_theme": get_theme_config(),
|
|
11
|
+
"LANGUAGE_CODE": translation.get_language() or "en",
|
|
12
|
+
}
|
|
13
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from copy import deepcopy
|
|
2
|
+
from django.conf import settings
|
|
3
|
+
|
|
4
|
+
DEFAULT_CONFIG = {
|
|
5
|
+
"SITE_TITLE": "Django Administration",
|
|
6
|
+
"SITE_HEADER": "Daisy Theme Admin",
|
|
7
|
+
"SITE_LOGO": None,
|
|
8
|
+
"SITE_LOGO_DARK": None,
|
|
9
|
+
"FAVICON": None,
|
|
10
|
+
"DEFAULT_THEME": "light",
|
|
11
|
+
"DARK_THEME": "dark",
|
|
12
|
+
"SHOW_THEME_SWITCHER": True,
|
|
13
|
+
"AVAILABLE_THEMES": [
|
|
14
|
+
"light",
|
|
15
|
+
"dark",
|
|
16
|
+
"emerald",
|
|
17
|
+
"cupcake",
|
|
18
|
+
"corporate",
|
|
19
|
+
"synthwave",
|
|
20
|
+
"night",
|
|
21
|
+
],
|
|
22
|
+
"DIRECTION": "auto",
|
|
23
|
+
"LOAD_DEFAULT_FONTS": True,
|
|
24
|
+
"FONT_FAMILY": None,
|
|
25
|
+
"COLLAPSIBLE_SIDEBAR": True,
|
|
26
|
+
"SHOW_RECENT_ACTIONS": True,
|
|
27
|
+
"CUSTOM_LINKS": [],
|
|
28
|
+
"FOOTER_TEXT": "Powered by django-daisy-theme",
|
|
29
|
+
"SHOW_VERSION": True,
|
|
30
|
+
"SHOW_BREADCRUMBS": True,
|
|
31
|
+
"ENABLE_SELECT2": True,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def get_theme_config(key=None):
|
|
36
|
+
"""
|
|
37
|
+
Returns the active theme configuration dictionary merged with default settings.
|
|
38
|
+
If a specific key is requested, returns its value.
|
|
39
|
+
"""
|
|
40
|
+
user_config = getattr(settings, "DAISY_THEME_CONFIG", {})
|
|
41
|
+
merged = deepcopy(DEFAULT_CONFIG)
|
|
42
|
+
merged.update(user_config)
|
|
43
|
+
if key:
|
|
44
|
+
return merged.get(key)
|
|
45
|
+
return merged
|