Skip to main content

django-api-admin

Expose django.contrib.admin as a restful service. useful for adding new features to django admin or writing a new admin.

Features ⚡

  • Expose all django.contrib.admin views as a restful api.
  • Similar to django.contrib.admin.
  • Customizable AdminSite and ModelAdmin.
  • Supports InlineModelAdmins.
  • Provides data to dynamically create forms on clients from serializers.
  • Supports Arabic Language.
  • Extensively tested

Requirements 📄

Python 3.7+

This package depends on

Installation 📲

Install django-api-admin package.

$ pip install django-api-admin

In your settings.py make sure you have django.contrib.admin and rest_framework in your installed apps. and add django_api_admin.

INSTALLED_APPS = [
    'django.contrib.admin',
    'rest_framework',
    'django_api_admin',
]

Example 💡

1. create some models.

models.py

from django.db import models


class Author(models.Model):
    name = models.CharField(max_length=100)

    def __str__(self):
        return self.name


class Book(models.Model):
    title = models.CharField(max_length=100)
    author = models.ForeignKey(Author, on_delete=models.CASCADE)

    def __str__(self):
        return self.title

2. register them using the admin site.

admin.py

from django_api_admin.sites import site
from .models import Author, Book

site.register(Author)
site.register(Book)

3. include admin urls.

urls.py

from django_api_admin.sites import site

urlpatterns = [
    path('api_admin/', site.urls),
]

4. run your development server.

$ python manage.py runsever

visit your localhost to see the browsable api.

Metadata

Release files for django-api-admin 1.0.2

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-api-admin 1.0.2
File Size Uploaded
django-api-admin-1.0.2.tar.gz 17.9 kB Details

Built distribution (wheel)

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

Total release size: 39.8 kB

Release files / django-api-admin-1.0.2.tar.gz

Download URL django-api-admin-1.0.2.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0137e1a2245435eda55510895ed1ba7ff046a635cf22b6416dcbf606746550b0
BLAKE2b-256 checksum
How to use checksums
f5f093efa1137b68fa6d7192987dbd6ab1c00993482551a43c6064cc2365d8e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

Release files / django_api_admin-1.0.2-py3-none-any.whl

Download URL django_api_admin-1.0.2-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d8a6f0d7a00e7870b8d604a650afb9f4b17bc44ff959904dc79e9fafe19b4fb
BLAKE2b-256 checksum
How to use checksums
9ec8a5b50b2fc93bd119e72cea97e23684d74bdaa67dc23b868bee854f9f5571
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

Release history Release notifications | RSS feed

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.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

1 release file

This release

1.0.2 This release

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