Skip to content

This package will convert django models to json schema for html forms for the frontend. It can be helpful while create web app with frontend library/frameworks such as Vue, React, Angular etc.

License

bkawan/django_schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


django_schema


Django Schema is a simple Django app to generate schema of Models .

Demo Link

image

Installation

$ pipenv install django_schema

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “schema” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...
    'django_schema',
]
  1. Add list of local apps to SCHEMA_APPS setting like this
SCHEMA_APPS = [
        'blog',
        'users',
        'product',
]
  1. Include the schema URLconf in your project urls.py like this:
from django.urls import include
urlpatterns = [
    ...
    path('schema/', include('django_schema.urls'))
]
  1. Visit http://127.0.0.1:8000/schema/ to check all the schema styles
  2. For testing
MODEL_SCHEMA_TEST = {
    'app_name':'blog',
    'model':'post'
}

To Do

  • Permission
  • Handling App versioning for ex ‘apps/v1/blog’, ‘apps/v1/users’
  • Add Serializers For all the Django Model Field INTERNAL_TYPES
  • Handle more html elements types
  • Add docs
  • Add Testing

About

This package will convert django models to json schema for html forms for the frontend. It can be helpful while create web app with frontend library/frameworks such as Vue, React, Angular etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published