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

Allows your list views to be filtered by query parameters.

InvalidLookupMixin

Returns an applicable error, instead of results based on an unfiltered queryset, if a provided lookup expression, filter, or model field is invalid.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

django-handyhelpers-0.0.31.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_handyhelpers-0.0.31-py3-none-any.whl (55.3 kB view details)

Uploaded Python 3

File details

Details for the file django-handyhelpers-0.0.31.tar.gz.

File metadata

  • Download URL: django-handyhelpers-0.0.31.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.1

File hashes

Hashes for django-handyhelpers-0.0.31.tar.gz
Algorithm Hash digest
SHA256 8d5729502a19e0c44c852043443ebddf1e511da1aa1c085db62fe69e06bd9971
MD5 574475b125d1cba0f309a7104a9c3212
BLAKE2b-256 b29b2ccbcab0211ef3d51b9503276bf20ce9bfba589c8118a5fe1726933452f1

See more details on using hashes here.

File details

Details for the file django_handyhelpers-0.0.31-py3-none-any.whl.

File metadata

  • Download URL: django_handyhelpers-0.0.31-py3-none-any.whl
  • Upload date:
  • Size: 55.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.1

File hashes

Hashes for django_handyhelpers-0.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 38236fb87a8f96d50ce71d6dfb4fe089ef872ae986366c4320552c66cc2e33c0
MD5 f7273d5cf41a41cffc2fa4c045436018
BLAKE2b-256 e1245d5a2a26ef28e9475de605915f632325439e8102d1c153ae39b768ad064d

See more details on using hashes here.

Supported by

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