Reusable, generic mixins for Django
CreateAndRedirectToEditView
mixin. It was marked for deprecation and removal since 1.0.JsonRequestAndResponseMixin
mixin which attempts to parse requests as JSON.CanonicalSlugDetailMixin
mixin which allows for the specification of a canonical slug on a DetailView
to help with SEO by redirecting on non-canonical requests.UserPassesTestMixin
mixin to replicate the behavior of Django's @user_passes_test
decorator.CanonicalSlugDetailMixin
.AccessMixin
now has a runtime-overridable login_url
attribute.GroupRequiredMixin
that made it not actually work.six.string_types
instead of explicitly relying on str
and unicode
types.
This fixes a problem with Python 3.reverse_lazy
to work for all AccessMixin
-derived mixins.FormValidMessageMixin
which provides a messages
message when the processed form is valid.FormInvalidMessageMixin
which provides a messages
message when the processed form is invalid.FormMessagesMixin
which provides the functionality of both of the above mixins.GroupRequiredMixin
which is a new access-level mixin which requires that a user be part of a specified group to access a view.JSONResponseMixin.render_json_response
method updated to accept a status code.JSONResponseMixin
added json_dumps_kwargs
attribute & get method to pass args to the json encoder.OrderableListMixin
allows ordering of list views by GET params.