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.
###StaffRequiredMixin Ensures the view is being request by an authenticated user that is marked as staff.
###SuperuserRequiredMixin Ensures the view is being request by an authenticated user that is marked as a superuser.
###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.3a6.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3001fae0d1f319febfad241e3a6b21c94d45952e29ff3d05d222140e7d51c81b |
|
MD5 | 442a81be11bc427cd2d8570e43215c37 |
|
BLAKE2b-256 | e4743be40893185a2a9ac6671a126e6261fdfc523a54b31adb8cc6f535589db6 |