Skip to main content

Django Admin Page API

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

/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
  • DELETE - Delete items
    • Search params:
      • keys - list of primary keys to delete (may be separated by commas)

/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

/admin-api/signin

  • POST - sign in (FormData)
    • Request body:
      • username: string
      • password: string

/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)

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)

Source distribution for django-admin-page-api 1.3.1
File Size Uploaded
django_admin_page_api-1.3.1.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-admin-page-api 1.3.1
File Interpreter ABI Platform
django_admin_page_api-1.3.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

1 release file

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page