django-admin-react 1.4.13__tar.gz → 1.5.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 (27) hide show
  1. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/PKG-INFO +41 -8
  2. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/README.md +36 -4
  3. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/pyproject.toml +13 -10
  4. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/LICENSE +0 -0
  5. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/README.md +0 -0
  6. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/__init__.py +0 -0
  7. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/apps.py +0 -0
  8. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/audit.py +0 -0
  9. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/conf.py +0 -0
  10. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/pwa.py +0 -0
  11. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/.vite/manifest.json +0 -0
  12. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/assets/ColumnLayoutModal-Bqf6vN1j.js +0 -0
  13. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/assets/JsonViewer-DkeJkG12.js +0 -0
  14. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/assets/index-CGh8t5dj.js +0 -0
  15. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/assets/index-CpxUkcdm.css +0 -0
  16. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/static/admin_react/index.html +0 -0
  17. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/README.md +0 -0
  18. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/admin/base_site.html +0 -0
  19. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/admin_react/README.md +0 -0
  20. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/admin_react/index.html +0 -0
  21. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/admin_react/login.html +0 -0
  22. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/admin_react/sw.js +0 -0
  23. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templates/django_admin_react/_experience_toggle_strip.html +0 -0
  24. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templatetags/__init__.py +0 -0
  25. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/templatetags/experience_toggle.py +0 -0
  26. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/urls.py +0 -0
  27. {django_admin_react-1.4.13 → django_admin_react-1.5.0}/django_admin_react/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-admin-react
3
- Version: 1.4.13
3
+ Version: 1.5.0
4
4
  Summary: A drop-in React single-page admin for Django, driven entirely by ModelAdmin.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -10,6 +10,7 @@ Requires-Python: >=3.10,<4.0
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Web Environment
12
12
  Classifier: Framework :: Django
13
+ Classifier: Framework :: Django :: 4.2
13
14
  Classifier: Framework :: Django :: 5.0
14
15
  Classifier: Framework :: Django :: 5.1
15
16
  Classifier: Framework :: Django :: 5.2
@@ -25,9 +26,9 @@ Classifier: Programming Language :: Python :: 3.13
25
26
  Classifier: Programming Language :: Python :: 3.14
26
27
  Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
27
28
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
- Requires-Dist: django (>=5.0,<7.0)
29
- Requires-Dist: django-admin-mcp-api (>=1.0.0,<2.0.0)
30
- Requires-Dist: django-admin-rest-api (>=1.0.6,<2.0.0)
29
+ Requires-Dist: django (>=4.2,<7.0)
30
+ Requires-Dist: django-admin-mcp-api (>=1.1.0,<2.0.0)
31
+ Requires-Dist: django-admin-rest-api (>=1.1.0,<2.0.0)
31
32
  Project-URL: Documentation, https://github.com/MartinCastroAlvarez/django-admin-react#readme
32
33
  Project-URL: Homepage, https://github.com/MartinCastroAlvarez/django-admin-react
33
34
  Project-URL: Repository, https://github.com/MartinCastroAlvarez/django-admin-react
@@ -190,9 +191,12 @@ DJANGO_ADMIN_REACT = {
190
191
  "BRAND_LOGO_URL": None, # str | None — favicon + sidebar logo;
191
192
  # falls back to AdminSite.site_logo. Absolute
192
193
  # URL or a path under your STATIC_URL.
193
- "PRIMARY_COLOR": "#2563eb", # accent for primary buttons, links, and
194
- # active states. Hex only (validated);
195
- # injected as the --dar-primary CSS var, so
194
+ "PRIMARY_COLOR": None, # accent for primary buttons, links, and
195
+ # active states (#437 / #631). Hex only
196
+ # (validated). None reads
197
+ # `site_primary_color` off your AdminSite;
198
+ # fallback default is "#2563eb". Injected
199
+ # as the --dar-primary CSS var, so
196
200
  # rebranding needs no React rebuild.
197
201
 
198
202
  # Auth + API mount
@@ -247,10 +251,39 @@ Both values are written into the SPA index template as standard
247
251
  reads them at boot, so the first paint already carries the consumer's
248
252
  brand. No flash of the package's defaults.
249
253
 
254
+ #### Accent colour (`PRIMARY_COLOR` + `AdminSite.site_primary_color`)
255
+
256
+ `PRIMARY_COLOR` defaults to `None` so a custom `AdminSite` subclass can
257
+ own the brand colour the same way it owns `site_header` / `site_logo`
258
+ (#631). Resolution order — explicit setting wins, AdminSite is the
259
+ structural default, built-in fallback last:
260
+
261
+ 1. `DJANGO_ADMIN_REACT["PRIMARY_COLOR"]` — explicit per-deployment override.
262
+ 2. `<your AdminSite>.site_primary_color` — convention attribute on your
263
+ custom `AdminSite` subclass (Django has no such attribute by default;
264
+ add it as a constant alongside `site_header` / `site_logo`).
265
+ 3. `"#2563eb"` — the package's last-resort fallback.
266
+
267
+ Every layer runs through a strict hex-colour regex (`#rgb` / `#rgba` /
268
+ `#rrggbb` / `#rrggbbaa`) before being injected into the SPA's `<style>`
269
+ block, so a non-hex value at any layer falls through to the next — CSS
270
+ injection is impossible at any source.
271
+
272
+ ```python
273
+ # myproject/admin.py
274
+ from django.contrib.admin import AdminSite
275
+
276
+ class AcmeAdminSite(AdminSite):
277
+ site_header = "Acme"
278
+ site_title = "Acme Admin"
279
+ site_logo = "/static/acme/logo.svg"
280
+ site_primary_color = "#10b981" # emerald — used by legacy admin AND the SPA
281
+ ```
282
+
250
283
  ### Requirements
251
284
 
252
285
  - **Python**: 3.10+
253
- - **Django**: 5.0, 5.1, 5.2, 6.0 (and any later 6.x)
286
+ - **Django**: 4.2 LTS, 5.0, 5.1, 5.2 LTS, 6.0 (and any later 6.x)
254
287
  - **Database**: anything Django supports — the package is ORM-only,
255
288
  no direct SQL.
256
289
  - **Auth**: Django's built-in session + CSRF. Works with custom
@@ -155,9 +155,12 @@ DJANGO_ADMIN_REACT = {
155
155
  "BRAND_LOGO_URL": None, # str | None — favicon + sidebar logo;
156
156
  # falls back to AdminSite.site_logo. Absolute
157
157
  # URL or a path under your STATIC_URL.
158
- "PRIMARY_COLOR": "#2563eb", # accent for primary buttons, links, and
159
- # active states. Hex only (validated);
160
- # injected as the --dar-primary CSS var, so
158
+ "PRIMARY_COLOR": None, # accent for primary buttons, links, and
159
+ # active states (#437 / #631). Hex only
160
+ # (validated). None reads
161
+ # `site_primary_color` off your AdminSite;
162
+ # fallback default is "#2563eb". Injected
163
+ # as the --dar-primary CSS var, so
161
164
  # rebranding needs no React rebuild.
162
165
 
163
166
  # Auth + API mount
@@ -212,10 +215,39 @@ Both values are written into the SPA index template as standard
212
215
  reads them at boot, so the first paint already carries the consumer's
213
216
  brand. No flash of the package's defaults.
214
217
 
218
+ #### Accent colour (`PRIMARY_COLOR` + `AdminSite.site_primary_color`)
219
+
220
+ `PRIMARY_COLOR` defaults to `None` so a custom `AdminSite` subclass can
221
+ own the brand colour the same way it owns `site_header` / `site_logo`
222
+ (#631). Resolution order — explicit setting wins, AdminSite is the
223
+ structural default, built-in fallback last:
224
+
225
+ 1. `DJANGO_ADMIN_REACT["PRIMARY_COLOR"]` — explicit per-deployment override.
226
+ 2. `<your AdminSite>.site_primary_color` — convention attribute on your
227
+ custom `AdminSite` subclass (Django has no such attribute by default;
228
+ add it as a constant alongside `site_header` / `site_logo`).
229
+ 3. `"#2563eb"` — the package's last-resort fallback.
230
+
231
+ Every layer runs through a strict hex-colour regex (`#rgb` / `#rgba` /
232
+ `#rrggbb` / `#rrggbbaa`) before being injected into the SPA's `<style>`
233
+ block, so a non-hex value at any layer falls through to the next — CSS
234
+ injection is impossible at any source.
235
+
236
+ ```python
237
+ # myproject/admin.py
238
+ from django.contrib.admin import AdminSite
239
+
240
+ class AcmeAdminSite(AdminSite):
241
+ site_header = "Acme"
242
+ site_title = "Acme Admin"
243
+ site_logo = "/static/acme/logo.svg"
244
+ site_primary_color = "#10b981" # emerald — used by legacy admin AND the SPA
245
+ ```
246
+
215
247
  ### Requirements
216
248
 
217
249
  - **Python**: 3.10+
218
- - **Django**: 5.0, 5.1, 5.2, 6.0 (and any later 6.x)
250
+ - **Django**: 4.2 LTS, 5.0, 5.1, 5.2 LTS, 6.0 (and any later 6.x)
219
251
  - **Database**: anything Django supports — the package is ORM-only,
220
252
  no direct SQL.
221
253
  - **Auth**: Django's built-in session + CSRF. Works with custom
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "django-admin-react"
3
- version = "1.4.13"
3
+ version = "1.5.0"
4
4
  description = "A drop-in React single-page admin for Django, driven entirely by ModelAdmin."
5
5
  authors = ["django-admin-react contributors"]
6
6
  license = "MIT"
@@ -13,6 +13,7 @@ classifiers = [
13
13
  "Development Status :: 5 - Production/Stable",
14
14
  "Environment :: Web Environment",
15
15
  "Framework :: Django",
16
+ "Framework :: Django :: 4.2",
16
17
  "Framework :: Django :: 5.0",
17
18
  "Framework :: Django :: 5.1",
18
19
  "Framework :: Django :: 5.2",
@@ -39,9 +40,11 @@ include = [
39
40
 
40
41
  [tool.poetry.dependencies]
41
42
  python = "^3.10"
42
- # Django 5.0 → 5.2 LTS → 6.x. Bump the upper bound when 7.0 ships and
43
- # we've verified the package still passes its test matrix on it.
44
- django = ">=5.0,<7.0"
43
+ # Django 4.2 LTS → 5.2 LTS → 6.x (#622). Bump the upper bound when 7.0
44
+ # ships and we've verified the package still passes its test matrix on
45
+ # it. The dependent ``django-admin-rest-api`` package also supports 4.2
46
+ # (since its 1.1.0).
47
+ django = ">=4.2,<7.0"
45
48
  # The JSON REST API surface (every list / detail / create / update /
46
49
  # delete / action / history / autocomplete endpoint) lives in this
47
50
  # sibling package — same `ModelAdmin` source of truth, same permissions,
@@ -49,16 +52,16 @@ django = ">=5.0,<7.0"
49
52
  # React SPA super-layer over `django-admin-rest-api`. The package's URLs
50
53
  # are included by `django_admin_react.urls`, and consumers add
51
54
  # `"django_admin_rest_api"` to `INSTALLED_APPS` alongside this package.
52
- django-admin-rest-api = "^1.0.6"
55
+ django-admin-rest-api = "^1.1.0"
53
56
  # `django-admin-mcp-api` — MCP-protocol adapter over the same REST API
54
57
  # so agents reach the SAME `ModelAdmin`-driven surface. Wire-protocol-only
55
58
  # layer; adds NO new functionality, permissions, or validation.
56
59
  # Constraint widened in v1.4.4 (#605) from the original `^0.1.0a0`
57
- # (which caps at `<0.2.0`) to `>=1.0.0,<2.0.0` so consumers can pin
58
- # the stable `1.x` mcp line. The wire contract is unchanged across
59
- # the 0.1.0a0 → 1.x bump; the version bump is a stability signal,
60
- # not an API break.
61
- django-admin-mcp-api = ">=1.0.0,<2.0.0"
60
+ # to `>=1.0.0,<2.0.0`; raised again in v1.5.0 (#622) to `>=1.1.0,<2.0.0`
61
+ # so a consumer on Django 4.2 actually gets a Django-4.2-compatible MCP
62
+ # (the 1.0.x line pins ``django>=5.0``, which would refuse to install
63
+ # alongside Django 4.2).
64
+ django-admin-mcp-api = ">=1.1.0,<2.0.0"
62
65
 
63
66
  [tool.poetry.group.dev.dependencies]
64
67
  # Dependabot #5: pytest's tmpdir handled symlinks unsafely