Commit d4d9a92
Owner directive 2026-05-28: "this library implements no API at all! it
requires the django-admin-rest-api as prerequisited because it relies
on it to put the react layer on top. Next clean up everything that is
not directly linked to this: relying on the react admin rest api
endpoints to put the React app on top of it."
Also: "eliminate the excess of md files and keep only the most relevant
ones." Survivors: README (product sales page), ARCHITECTURE, SECURITY,
LICENSE.
## What this PR does
- **Bumps `django-admin-rest-api` → `^1.0.0`** (the v1 the owner just
shipped to PyPI).
- **Deletes `django_admin_react/api/` entirely** — every endpoint, the
serializer denylist, the permission gates, the wire-level helpers.
None of it lived in this repo's mandate any more.
- **Swaps `django_admin_react/urls.py`** to `include("django_admin_rest_api.api.urls")`
at the `api/v1/` prefix the SPA already expects. The wire shape is
identical (it's literally the same code, just imported from PyPI).
- **`views.py` / `pwa.py`** now import the staff-gate + admin-site
lookup from `django_admin_rest_api.api.{permissions,registry}` — the
package is the single source of truth for those helpers.
- **`tests/test_project/settings.py`** gets `"django_admin_rest_api"`
in `INSTALLED_APPS` alongside this package, mirroring what consumers
do.
- **Deletes 36 API-test files** — every list / detail / create / update /
delete / actions / inlines / autocomplete / history / panels / etc.
test belongs to the API repo's suite; this repo's tests now cover
only what's still SPA-side: `test_spa_index.py`, `test_pwa.py`,
`test_login.py` (the package's own login that replaces the legacy
admin login).
- **Deletes 9 excess root .md files**: ACCEPTANCE / API_CONTRACT /
CHANGELOG / CLAUDE / CONTRIBUTING / DESIGN_SYSTEM / ONBOARDING /
PRODUCT_VISION / TESTING. Survivors are README + ARCHITECTURE +
SECURITY + LICENSE; their cross-links to the deleted files are
rewritten or removed.
## Verification
- `poetry lock` + `poetry install` resolve cleanly with the v1 dep.
- `poetry run pytest` → **42 passed** (covers the SPA mount, the PWA,
the package's own login). The 87% line coverage on what remains is
the right number: this repo's runtime surface is now narrow and
fully exercised.
- No remaining `django_admin_react.api.*` imports anywhere in
`django_admin_react/` or `tests/`.
Refs #544 (Phases 2 + 3 + 4 collapsed into one).
Co-authored-by: Martin Castro Laminrs <mcastro@laminr.ai>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 38c712b commit d4d9a92
85 files changed
Lines changed: 73 additions & 19469 deletions
File tree
- django_admin_react
- api
- views
- tests
- test_project
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 156 | + | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
| |||
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
168 | | - | |
| 166 | + | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
| |||
This file was deleted.
0 commit comments