Helpful mixins for Django View classes.
Project description
Provides some common mixin patterns for Django’s View classes.
Installation
Run pip install django-viewclass-mixins
View Mixins
###LoginMixin Ensures the view is being requested by an authenticated user or redirects to the login page. It behaves the same as the function decorator login_required.
###ObjectOwnerMixin A mixin to single-object views. Ensures the view is by requested by the owner of the requested object.
###DeactivateMixin A mixin to the DeleteView. Instead of deleting an object it will mark it as inactive instead.
###FilterListMixin A mixin to the ListView. It will apply filters from the URL querystring to the underlying QuerySet before the list is returned.
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
Hashes for django-viewclass-mixins-0.2a3.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 270efd08d8538a1d679c51aac0117d42662935e96da1fcd72d09bb7c1d0c7c75 |
|
MD5 | 09676f906988ca71997dc114c3bf8325 |
|
BLAKE2b-256 | 128640edf08b04e8046317726efc0d053089b82cd4648c9dc5d19c9e17a3613a |