Skip to main content

A collection of handy utilities to support django operations

Project description

django-handy-helpers

Author David Slusser
Description A collection of handy utilities to support django projects
Requirements Python 3.x
Django 2.2.x

Documentation

Full documentation can be found on http://django-handyhelpers.readthedocs.org. Documentation source files are available in the docs folder.

How to Install

The django-userextensions package is available on Python Package Index (PyPI) and can be installed via pip:

pip install django-handyhelpers

add 'handyhelpers' to your INSTALLED_APPS (for management commands and templates)

INSTALLED_APPS = [
    ...
    'handyhelpers',
]

Management Commands

DRF Generator

Django-handyhelpers includes manage.py commands to generate DRF files (api views, serializers, urls) for a given app in your project. This is done using jinja templates that define the structure of each file. Default templates are provided, and custom templates can be provided in the command. By default, all models and models fields are included.

Example command:

manage.py generate_drf <my_app> --serializer
manage.py generate_drf <my_app> --serializer --serializer_template <my_custom_template>

** use the --help parameter for a full list of options

manage.py generate_drf --help

Admin Generator

Included with django-handyhelpers are manage.py commands to auto-generate an admin.py file for a given application in your project. This is done using a jinja template that defines the structure of the admin.py file. A default template is provided.

Example command:

manage.py generate_admin <my_app>
manage.py generate_admin <my_app> --template <my_custom_template>

** use the --help parameter for a full list of options

manage.py generate-admin --help     

Mixins

FilterByQueryParamsMixin

InvalidLookupMixin

Project details


Download files

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

Files for django-handyhelpers, version 0.0.17
Filename, size File type Python version Upload date Hashes
Filename, size django_handyhelpers-0.0.17-py3-none-any.whl (96.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-handyhelpers-0.0.17.tar.gz (33.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page