Skip to content
Generate initial serializers and viewsets
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
django_rest_framework_generator
.gitignore
LICENSE
README.md
setup.py

README.md

Generate initial & very basic serializers and viewsets

Installation

pip install git+git://github.com/rapilabs/django-rest-framework-generator.git

or in your requirements.txt:

-e git+git://github.com/rapilabs/django-rest-framework-generator.git#egg=django-rest-framework-generator

and in your settings.py add:

INSTALLED_APPS = [
    # ...
    'django_rest_framework_generator',
]

Usage

To generate serializers:

python manage.py generate_serializers_views <app_name> > <app_dir>/serializers.py

To generate viewsets:

python manage.py generate_serializers_views <app_name> --viewsets > <app_dir>/views.py

To generate urls:

python manage.py generate_serializers_views <app_name> --urls > <app_dir>/urls.py

You can’t perform that action at this time.