django-daisy-theme 0.1.0__tar.gz

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.
Files changed (65) hide show
  1. django_daisy_theme-0.1.0/LICENSE +21 -0
  2. django_daisy_theme-0.1.0/PKG-INFO +92 -0
  3. django_daisy_theme-0.1.0/README.md +64 -0
  4. django_daisy_theme-0.1.0/django_daisy_theme/__init__.py +2 -0
  5. django_daisy_theme-0.1.0/django_daisy_theme/apps.py +6 -0
  6. django_daisy_theme-0.1.0/django_daisy_theme/context_processors.py +13 -0
  7. django_daisy_theme-0.1.0/django_daisy_theme/settings.py +45 -0
  8. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/css/daisy-theme.min.css +11 -0
  9. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/css/fonts.css +68 -0
  10. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Bold.woff2 +0 -0
  11. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Medium.woff2 +0 -0
  12. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/inter/Inter-Regular.woff2 +0 -0
  13. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Bold.woff2 +0 -0
  14. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Medium.woff2 +0 -0
  15. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/fonts/vazirmatn/Vazirmatn-Regular.woff2 +0 -0
  16. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/img/logo.svg +14 -0
  17. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/js/alpine.min.js +5 -0
  18. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/js/daisy-theme.js +100 -0
  19. django_daisy_theme-0.1.0/django_daisy_theme/static/django_daisy_theme/js/select2-init.js +202 -0
  20. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/404.html +27 -0
  21. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/500.html +27 -0
  22. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/actions.html +49 -0
  23. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/auth/user/change_password.html +182 -0
  24. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/base.html +150 -0
  25. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/base_site.html +21 -0
  26. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/change_form.html +107 -0
  27. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/change_list.html +187 -0
  28. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/change_list_results.html +69 -0
  29. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/delete_confirmation.html +48 -0
  30. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/delete_selected_confirmation.html +50 -0
  31. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/edit_inline/stacked.html +67 -0
  32. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/edit_inline/tabular.html +107 -0
  33. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/filter.html +21 -0
  34. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/breadcrumbs.html +36 -0
  35. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/fieldset.html +102 -0
  36. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/navbar.html +91 -0
  37. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/sidebar.html +106 -0
  38. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/stats_cards.html +46 -0
  39. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/includes/theme_toggle.html +93 -0
  40. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/index.html +170 -0
  41. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/login.html +140 -0
  42. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/object_history.html +166 -0
  43. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/pagination.html +27 -0
  44. django_daisy_theme-0.1.0/django_daisy_theme/templates/admin/submit_line.html +64 -0
  45. django_daisy_theme-0.1.0/django_daisy_theme/templates/registration/password_change_done.html +46 -0
  46. django_daisy_theme-0.1.0/django_daisy_theme/templates/registration/password_change_form.html +161 -0
  47. django_daisy_theme-0.1.0/django_daisy_theme/templatetags/__init__.py +3 -0
  48. django_daisy_theme-0.1.0/django_daisy_theme/templatetags/daisy_theme.py +142 -0
  49. django_daisy_theme-0.1.0/django_daisy_theme.egg-info/PKG-INFO +92 -0
  50. django_daisy_theme-0.1.0/django_daisy_theme.egg-info/SOURCES.txt +63 -0
  51. django_daisy_theme-0.1.0/django_daisy_theme.egg-info/dependency_links.txt +1 -0
  52. django_daisy_theme-0.1.0/django_daisy_theme.egg-info/requires.txt +1 -0
  53. django_daisy_theme-0.1.0/django_daisy_theme.egg-info/top_level.txt +1 -0
  54. django_daisy_theme-0.1.0/pyproject.toml +47 -0
  55. django_daisy_theme-0.1.0/setup.cfg +4 -0
  56. django_daisy_theme-0.1.0/tests/test_assets.py +25 -0
  57. django_daisy_theme-0.1.0/tests/test_config.py +26 -0
  58. django_daisy_theme-0.1.0/tests/test_demo_project.py +16 -0
  59. django_daisy_theme-0.1.0/tests/test_templates_base.py +63 -0
  60. django_daisy_theme-0.1.0/tests/test_templates_changeform.py +84 -0
  61. django_daisy_theme-0.1.0/tests/test_templates_changelist.py +34 -0
  62. django_daisy_theme-0.1.0/tests/test_templates_dashboard.py +80 -0
  63. django_daisy_theme-0.1.0/tests/test_templates_history.py +65 -0
  64. django_daisy_theme-0.1.0/tests/test_templates_password.py +94 -0
  65. django_daisy_theme-0.1.0/tests/test_templatetags.py +106 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 django-daisy-theme contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-daisy-theme
3
+ Version: 0.1.0
4
+ Summary: A modern, responsive DaisyUI & Tailwind CSS theme for Django Admin with native bi-directional RTL/LTR support
5
+ Author: Django Daisy Theme Contributors
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/sadng11/django-daisy-theme
8
+ Project-URL: Documentation, https://github.com/sadng11/django-daisy-theme#readme
9
+ Project-URL: Issues, https://github.com/sadng11/django-daisy-theme/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Web Environment
12
+ Classifier: Framework :: Django
13
+ Classifier: Framework :: Django :: 4.2
14
+ Classifier: Framework :: Django :: 5.0
15
+ Classifier: Framework :: Django :: 5.1
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: django>=4.2
27
+ Dynamic: license-file
28
+
29
+ # django-daisy-theme 🌼
30
+
31
+ A modern, responsive, and customizable theme for the Django Admin interface built with **Tailwind CSS v3.4**, **daisyUI v4**, and **Alpine.js**.
32
+
33
+ ---
34
+
35
+ ## Features
36
+
37
+ - ⚡ **Zero-Configuration Plug-and-Play:** Install and add to `INSTALLED_APPS` — that's it!
38
+ - 🌐 **Native RTL & LTR Bi-Directional Support:** Automatic direction detection via `get_current_language_bidi()` with tailored typography (Vazirmatn for Persian/Arabic, Inter for Latin).
39
+ - 📱 **Mobile-First Responsive Layout:** Fluid DaisyUI Drawer for mobile touch navigation and collapsible sidebar on desktop.
40
+ - 🎨 **Theme Switcher:** Seamless switching between DaisyUI themes (`light`, `dark`, `emerald`, `cupcake`, `synthwave`, `night`, etc.) synced to `localStorage`.
41
+ - 📊 **Modern Dashboard:** Card-based app & model groupings, quick action buttons, metric stats, and styled activity feeds.
42
+ - 🔍 **Enhanced Data Tables:** Slide-over filter drawer, floating action bar, and zebra-striped tables.
43
+ - 📦 **No Node.js Required:** Production CSS, JS, and font assets are pre-compiled and bundled directly within the Python package.
44
+
45
+ ---
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install django-daisy-theme
51
+ ```
52
+
53
+ Add `django_daisy_theme` to your `INSTALLED_APPS` in `settings.py` **before** `django.contrib.admin`:
54
+
55
+ ```python
56
+ INSTALLED_APPS = [
57
+ "django_daisy_theme", # Must be before django.contrib.admin
58
+ "django.contrib.admin",
59
+ "django.contrib.auth",
60
+ "django.contrib.contenttypes",
61
+ "django.contrib.sessions",
62
+ "django.contrib.messages",
63
+ "django.contrib.staticfiles",
64
+ # ...
65
+ ]
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Configuration (Optional)
71
+
72
+ Customize your admin panel inside `settings.py`:
73
+
74
+ ```python
75
+ DAISY_THEME_CONFIG = {
76
+ "SITE_TITLE": "My Company Admin",
77
+ "SITE_HEADER": "Company Management",
78
+ "SITE_LOGO": "/static/images/logo.svg",
79
+ "DEFAULT_THEME": "light",
80
+ "DARK_THEME": "dark",
81
+ "SHOW_THEME_SWITCHER": True,
82
+ "AVAILABLE_THEMES": ["light", "dark", "emerald", "cupcake", "night"],
83
+ "DIRECTION": "auto",
84
+ "COLLAPSIBLE_SIDEBAR": True,
85
+ }
86
+ ```
87
+
88
+ ---
89
+
90
+ ## License
91
+
92
+ This project is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,64 @@
1
+ # django-daisy-theme 🌼
2
+
3
+ A modern, responsive, and customizable theme for the Django Admin interface built with **Tailwind CSS v3.4**, **daisyUI v4**, and **Alpine.js**.
4
+
5
+ ---
6
+
7
+ ## Features
8
+
9
+ - ⚡ **Zero-Configuration Plug-and-Play:** Install and add to `INSTALLED_APPS` — that's it!
10
+ - 🌐 **Native RTL & LTR Bi-Directional Support:** Automatic direction detection via `get_current_language_bidi()` with tailored typography (Vazirmatn for Persian/Arabic, Inter for Latin).
11
+ - 📱 **Mobile-First Responsive Layout:** Fluid DaisyUI Drawer for mobile touch navigation and collapsible sidebar on desktop.
12
+ - 🎨 **Theme Switcher:** Seamless switching between DaisyUI themes (`light`, `dark`, `emerald`, `cupcake`, `synthwave`, `night`, etc.) synced to `localStorage`.
13
+ - 📊 **Modern Dashboard:** Card-based app & model groupings, quick action buttons, metric stats, and styled activity feeds.
14
+ - 🔍 **Enhanced Data Tables:** Slide-over filter drawer, floating action bar, and zebra-striped tables.
15
+ - 📦 **No Node.js Required:** Production CSS, JS, and font assets are pre-compiled and bundled directly within the Python package.
16
+
17
+ ---
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install django-daisy-theme
23
+ ```
24
+
25
+ Add `django_daisy_theme` to your `INSTALLED_APPS` in `settings.py` **before** `django.contrib.admin`:
26
+
27
+ ```python
28
+ INSTALLED_APPS = [
29
+ "django_daisy_theme", # Must be before django.contrib.admin
30
+ "django.contrib.admin",
31
+ "django.contrib.auth",
32
+ "django.contrib.contenttypes",
33
+ "django.contrib.sessions",
34
+ "django.contrib.messages",
35
+ "django.contrib.staticfiles",
36
+ # ...
37
+ ]
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Configuration (Optional)
43
+
44
+ Customize your admin panel inside `settings.py`:
45
+
46
+ ```python
47
+ DAISY_THEME_CONFIG = {
48
+ "SITE_TITLE": "My Company Admin",
49
+ "SITE_HEADER": "Company Management",
50
+ "SITE_LOGO": "/static/images/logo.svg",
51
+ "DEFAULT_THEME": "light",
52
+ "DARK_THEME": "dark",
53
+ "SHOW_THEME_SWITCHER": True,
54
+ "AVAILABLE_THEMES": ["light", "dark", "emerald", "cupcake", "night"],
55
+ "DIRECTION": "auto",
56
+ "COLLAPSIBLE_SIDEBAR": True,
57
+ }
58
+ ```
59
+
60
+ ---
61
+
62
+ ## License
63
+
64
+ This project is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,2 @@
1
+ __version__ = "0.1.0"
2
+ default_app_config = "django_daisy_theme.apps.DjangoDaisyThemeConfig"
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class DjangoDaisyThemeConfig(AppConfig):
5
+ name = "django_daisy_theme"
6
+ verbose_name = "Daisy Theme for Django Admin"
@@ -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