Skip to main content

Helpful mixins for Django View classes.

Project description

Provides some common mixin patterns for Django’s View classes.


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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (7.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page