skip to navigation
skip to content

dj-extensions 0.1.6

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

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

 
File Type Py Version Uploaded on Size
dj-extensions-0.1.6.zip (md5) Source 2016-02-06 7KB