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.
###OwnershipMixin 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.2.1a5.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf6ff850c1df889c367459f1eb275430e24d64d76cb95742650a73d013bbd8f |
|
MD5 | 1062e72136e263375309422bdc40b584 |
|
BLAKE2b-256 | a97d22a7f5092471bd899775ccd7acbc985bb6e6806aa8683c6596b2d94fd940 |