Django Admin Page API
Project description
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_page_api-1.3.1.tar.gz.
File metadata
- Download URL: django_admin_page_api-1.3.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2adebcb1116d84c9df852c98f871af0fb4a7afeed56f725dd22f3229ee73a8e7
|
|
| MD5 |
6aebb2e380d78a4115b9e76f1d99af09
|
|
| BLAKE2b-256 |
b0a7613f692648ba75462a3950758d3c8b83eaa7161c90f2d1d0c4470ba3b506
|
File details
Details for the file django_admin_page_api-1.3.1-py3-none-any.whl.
File metadata
- Download URL: django_admin_page_api-1.3.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4bfb2ff60846e9a3fe1ef91cd4254883aabac37149d7a415224deb33c77384
|
|
| MD5 |
561a0276957526f31f22ae0e1576e6b7
|
|
| BLAKE2b-256 |
bb490a04c00f3c3d6ee9479f55bbbab9663f9262232e6062340d1d36d9f22c48
|