Django Admin Page API
Instalation
Run a command:
pip install django-admin-page-api
Make changes in your project:
# urls.py
from django_admin_page_api import sites
urlpatterns = [
...
path('admin-api/', sites.urls),
...
]
# settings.py
INSTALLED_APPS = [
...
'django_admin_page_api',
...
]
Important: Data should be send using FormData
Endpoints
/admin-api/
- GET - Fetch list of models available in django admin
/admin-api/<app_label>/<model_name>
-
GET - Fetch model info
-
POST - Create new instance of model (FormData)
/admin-api/<app_label>/<model_name>/<field_name>/autocomplete/
- GET - get possible value to relation
- Search params:
- offset: number
- limit: number
- query: json string - e.g. {"int_field__gt": 1}
- sort: string
- asc: boolean string
- Search params:
/admin-api/<app_label>/<model_name>/items
- GET - List of items
- Search params:
- offset: number
- limit: number
- query: json string - e.g. {"int_field__gt": 1}
- sort: string
- asc: boolean string
- Search params:
- DELETE - Delete items
- Search params:
- keys - list of primary keys to delete (may be separated by commas)
- Search params:
/admin-api/<app_label>/<model_name>/<pk>
- GET - Fetch item data
- PUT - Update instance of the object and save (FormData)
- DELETE - Delete item
/admin-api/<app_label>/<model_name>/<pk>/<field_name>/autocomplete/
- GET - get possible value to relation
- Search params:
- offset: number
- limit: number
- query: json string - e.g. {"int_field__gt": 1}
- sort: string
- asc: boolean string
- Search params:
/admin-api/signin
- POST - sign in (FormData)
- Request body:
- username: string
- password: string
- Request body:
/admin-api/signout
/admin-api/info
- GET - Fetch current user and session data
/admin-api/csrf
- GET - Fetch csrf token
/admin-api/logs
- GET - Fetch logs of authenticated user
/admin-api/<app_label>/<model_name>/action/<action_code>/
- POST - run model action
- Request body:
- keys - list of primary keys to delete (may be separated by commas)
- Request body:
Metadata
Release files for django-admin-page-api 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_admin_page_api-1.3.1.tar.gz | 9.0 kB | Without provenance | Details for django_admin_page_api-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_page_api-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for django_admin_page_api-1.3.1-py3-none-any.whl |
Total release size: 18.9 kB
Release files / django_admin_page_api-1.3.1.tar.gz
| Download URL | django_admin_page_api-1.3.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2adebcb1116d84c9df852c98f871af0fb4a7afeed56f725dd22f3229ee73a8e7
|
|
BLAKE2b-256 checksum How to use checksums |
b0a7613f692648ba75462a3950758d3c8b83eaa7161c90f2d1d0c4470ba3b506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / django_admin_page_api-1.3.1-py3-none-any.whl
| Download URL | django_admin_page_api-1.3.1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c4bfb2ff60846e9a3fe1ef91cd4254883aabac37149d7a415224deb33c77384
|
|
BLAKE2b-256 checksum How to use checksums |
bb490a04c00f3c3d6ee9479f55bbbab9663f9262232e6062340d1d36d9f22c48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for django-admin-page-api 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.