Skip to main content

Create DRF endpoints as fast as possible.

Project description

DRF_commands is a Django package that helps you to create django rest framework endpoints faster using manage.py.

You can visit Django rest framework website for more information about generic views:https://www.django-rest-framework.org/

Quick start

  1. Run pip install DRF_commands

  2. Add Both “rest_framework” and “DRF_commands” to your INSTALLED_APPS of your settings.py like this:

    INSTALLED_APPS = [
        ...
        'rest_framework',
        'DRF_commands',
    ]
  3. Create a Django application using DRF_commands:

python manage.py createApp [yourAppName]

  1. Run python manage.py using custom commands of DRF_commands to create generic views.

Available commands:

  • createApp [yourAppName]

  • createSerializer [appName][serializerName]

  • APIView [appName][viewName]

  • CreateAPIView [appName][viewName]

  • DestroyAPIView [appName][viewName]

  • ListAPIView [appName][viewName]

  • ListCreateAPIView [appName][viewName]

  • RetrieveAPIView [appName][viewName]

  • RetrieveDestroyAPIView [appName][viewName]

  • RetrieveUpdateAPIView [appName][viewName]

  • RetrieveUpdateDestroyAPIView [appName][viewName]

  • UpdateAPIView [appName][viewName]

Generated application working tree:

├── admin.py
├── apps.py
├── __init__.py
├── migrations
│   └── __init__.py
├── models
│   └── __init__.py
├── serializers
│   └── __init__.py
├── static
│   └── myapp
├── templates
│   └── myapp
├── tests.py
├── urls.py
└── views
    └── __init__.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DRF_commands-0.1.1.tar.gz (7.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page