Scaffold django rest apis like a champion β‘. said no one before
This library will help you to scaffold full Restful API Resources in seconds using only one command:
$ python manage.py dr_scaffold blog Post body:textfield author:foreignkey:Author
π Your RESTful Post api resource is ready π
models.py
with Models and fields generated by the CLI β‘admin.py
with Models registered and ready β‘views.py
with appropriate ViewSets readyβ‘urls.py
with appropriate URLs ready.β‘serializers.py
with Model Serializers ready β‘- and more ...
For a detailed guide read scaffold django apis like a champion
This library assumes that you have setup your project with Django Rest Framework. if not, please refer to this guide
Install dr_scaffold package :
$ pip install dr-scaffold
Add dr_scaffold
to your INSTALLED_APPS like this:
INSTALLED_APPS = [
...
'dr_scaffold'
]
If you are using a custom API structure, add CORE_FOLDER
and API_FOLDER
to your settings.py
:
#include a forward slash at the end of each
CORE_FOLDER = "my_core_folder/" # you can leave them empty
API_FOLDER = "my_api_folder/" # or set them to be the same
Enjoy π
We support most of django field types.
- add an option to include swagger documentation
- handle DRF ViewSets using Mixins