Skip to main content

django_rest_admin

Adding table CRUD rest api with admin ui and without coding.

requirements:

  1. django
  2. djangorestframework
  3. django-filter

install:

  1. pip install django_rest_admin
  2. add django app: in django project setttings.py file: INSTALLED_APPS list, add:
    'rest_framework',
    'django_filters',
    'django_rest_admin',
  1. add path in project urls.py:
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
    path('admin/', admin.site.urls),
    path('rest_admin/', include('django_rest_admin.urls')), <<--this line is what you should add
]

use:

  1. add table in your db: this could be down in navicat or some other db editors. of course you could coding in django,too.

  2. open admin page: http://127.0.0.1/admin/

    admin-page

    after login, their should be a table:Table-REST-CRUD. press Add.

    the option MUST be filled:

    A. route: the route name. eg: /Danwei
    B. Table big name: the model name of a table. eg: Danwei
    C. Table name: the table name. eg: danwei. ONLY needed if inspected_from_db=1
    D. Inspected from db: set to 1 if table is just from db, not from django model. otherwise set to 0.
    

    press Save

  3. press RefreshRestAPI BUTTON in the list.

  4. the django project will restart automaticly if you use debug mode. and then the rest api is generated already. press OpenApi button to test the api.

    admin-page

Metadata

Release files for django-rest-admin 0.1.9

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-rest-admin 0.1.9
File Size Uploaded Provenance
django_rest_admin-0.1.9.tar.gz 434.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-rest-admin 0.1.9
File Interpreter ABI Platform
django_rest_admin-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 881.9 kB

Release files / django_rest_admin-0.1.9.tar.gz

Download URL django_rest_admin-0.1.9.tar.gz
Size 434.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2759eb1a6c6555b1df7caeafb38d08eefa1f8f486d1a5cc776e26cffc9f6adec
BLAKE2b-256 checksum
How to use checksums
63a81b786d6457db2d2e2e87abad5d7eacf28fa7707655bdcc62ec1b20bb0c21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / django_rest_admin-0.1.9-py3-none-any.whl

Download URL django_rest_admin-0.1.9-py3-none-any.whl
Size 447.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b41afd2e537ba37039ad3928c1bb7fe307099d43c4d495ea090a4cacedeef7ac
BLAKE2b-256 checksum
How to use checksums
1ce1dc4755d252be204f5caaca1908be7a70abd6b51e76a6626a35508486a000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Security for django-rest-admin 0.1.9

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.

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