Skip to main content

Yet another Django extension with set of generic reusable, pluggable mixins

Project description

master build https://badge.fury.io/py/dj-extensions.svg https://coveralls.io/repos/github/jahan01/dj-extensions/badge.svg?branch=master https://codecov.io/github/jahan01/dj-extensions/coverage.svg?branch=master Documentation Status Documentation Status http://img.shields.io/badge/license-MIT-brightgreen.svg

Copyright © 2016 Jahan Balasubramaniam

Django Extensions

dj-extensions

Yet another Django extension with set of generic reusable, pluggable mixins

Installation

pip install dj-extensions

Currently includes following Mixins:

  • PermissionsRequiredMixin

  • AjaxOnlyMixin

  • PaginationMixin

  • FilterMixin

Usage:

from dj_extensions.views import PermissionsRequiredMixin, FilterMixin, PaginationMixin

class SomeView(PermissionsRequiredMixin, FilterMixin, PaginationMixin, ListView):
    model                = YourModel
    paginate_by          = 10
    n_list               = 5
    required_permissions = (
                            'app.permission1',
                            'app.permission2',
                           )
    allowed_filters      = {
                            'name': 'emp_name__icontains',
                            'age' : 'age_exact',
                           }

Source code: Find the source code at github repo

Documentation: Find the docs at readthedocs

For different versions:

To install latest version, which will not be available in pypi, run below

pip install --upgrade https://github.com/jahan01/dj-extensions/tree/master

License: MIT

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

dj-extensions-0.1.6.zip (7.4 kB view details)

Uploaded Source

File details

Details for the file dj-extensions-0.1.6.zip.

File metadata

  • Download URL: dj-extensions-0.1.6.zip
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dj-extensions-0.1.6.zip
Algorithm Hash digest
SHA256 c68d2da30f8a170b536f8a7cd3bb6168a3289c3716b6891c611216056598720b
MD5 65c98ce9f7b8d001207a43fedfa27ebf
BLAKE2b-256 6b79d621c368a6ee3bc060b68352564500eef854b403223389a2a5bf19046102

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