Changelog¶
:bug:`316 major` MultiplePermissionsRequiredMixin didn’t do object-level permission checks.
:bug:`309 minor` RecentLoginRequiredMixin no longer throws error about GET requests in Django >= 5.0
:support:`290` Fixed a few typos in the docs.
:support:`287` No longer building a universal wheel
:support:`300` Removed unnecessarily explicit super() call
:support:`301` Removed unnecessarily explicit super() call
:support:`307` Use unittest.mock instead of mock package
:feature:`305` Add support for Django 4.2
:support:`277` Updated the codebase to be more modern Python/Django
:feature:`245` Cache-related headers
:support:`-` Formatted project with black
:support:`-` Updated README
:feature:`265` Drop old Python and Django versions, bring in newer ones
:support:`260` Fixes the goshdang Travis tests.
:support:`250` Include documentation Makefile and conf.py in source distribution.
:support:`246` README more accurately explains the supported Django versions.
:support:`243` Adds support for Python 3.7 and Django 2.1.
:support:`244` Documentation link fix.
:support:`236` Refines the Django and Python versions tested against.
:support:`241` Fixes a documentation typo, “altenate” should be “alternate”.
:support:`237` Updates for Django 2.0.
:support:`232` Updates for Django 1.11.
:support:`227` Use SVG in README instead of PNG.
:support:`221` Renamed a duplicative method name.
:support:`220` Adds a warning for cases where
prefetch_relatedorselect_relatedare empty in their respective mixins.:bug:`215 major` Imports for 1.11 and 2.x
reverseandreverse_lazyfunctions.:support:`248` Include some files necessary for testing in the source distribution.
:feature:`228` Adds an
object_level_permissionsattribute to thePermissionRequiredMixinto allow for object-level permission checks instead of just view-level checks.:bug:`224 major` Allows
OPTIONSrequests to be body-less.:bug:`218 major`
AccessMixin.handle_no_permission` now accepts a ``requestparameter.:feature:`198` New OrderableListMixin allows to switch the default ordering setting from asc to desc.
:support:`215` Imports updated for Django 2.0.
:feature:`204` New HeaderMixin that allows custom headers to be set on a view.
:bug:`212 major` Small changes for Django 1.10 compatibility.
:bug:`211 major` ReadTheDocs links updated.
:bug:`209 major` Django documentation link updated.
:bug:`208 major` Fixed errors from combining certain access mixins.
:bug:`196 major` Refactor how users without permissions are handled.
:bug:`181 major` Fixed redirect loops based on user permissions.
:bug:`161 major` Fixed redirect loop for users without proper groups for
MultipleGroupRequiredMixinandGroupRequiredMixin.:support:`209` Fixed link to Django documentation for
user_passes_testdecorator.:feature:`203` Use Django’s supplied version of
sixto remove an external dependency.:support:`202` Fixed typo in
PermissionsRequiredMixinandMultiplePermissionsRequiredMixin.:support:`201` Fixed typo in
SuccessURLRedirectListMixin.:support:`192` Added example for
OrderableListView.:bug:`176` Only check time delta for authenticated users in RecentLoginRequiredMixin.
:bug:`-` Changed JsonRequestResponseMixin docs to not use ugettext_lazy.
:bug:`-` Updated tests to include Python 3.2.
:bug:`185` Removed u prefixes to allow Python 3.2 support.
:support:`-` Added note to docs about Python and Django versions used in tests.
:bug:`-` Fix small issue in docs for :ref:JsonResponseMixin. The accepted kwarg for the render_to_response method is status not status_code.
:support:`145` Allow custom exceptions to be raised by all AccessMixins.
:feature:`171` New
SSLRequiredMixin. Redirect http -> https.:feature:`138` New RecentLoginRequiredMixin to require user sessions to have a given freshness.
:bug:`164 major` Use resolve_url to handle LOGIN_REDIRECT_URL`s in `settings.py that are just URL names.
:bug:`130 major` New attribute on JSONResponseMixin to allow setting a custom JSON encoder class.
:bug:`131 major` New attribute on LoginRequiredMixin so it’s possible to redirect unauthenticated users while using
AccessMixin-derived mixins instead of throwing an exception.:support:`129` Split
views.pyout into multiple files since it was approaching 1000 LoC.:feature:`119` SetHeadlineMixin now accepts
headlinewithugettext_lazy()-wrapped strings.:bug:`94 major` Fixed a bug where JSONResponseMixin would override the
content_typeof Django’sTemplateViewin Django 1.6.:bug:`- major` Fixed bug in PermissionRequiredMixin where if
PermissionRequiredMixin.no_permissions_failreturned a false-y value, the user lacking the permission would pass instead of being denied access.:support:`73` Added doc for how to contribute.
:feature:`120` Added MessageMixin to allow easier access to Django’s
contrib.messagesmessages. FormValidMessageMixin and FormInvalidMessageMixin were updated to use it.:bug:`98 major` Fixed bug in CanonicalSlugDetailMixin to allow it to use custom URL kwargs.
:bug:`105 major` Fixed bug in GroupRequiredMixin where superusers were blocked by lack of group memberships.
:bug:`106 major` Fixed bug in GroupRequiredMixin which now correctly checks for group membership against a list.
:feature:`102` Added new StaticContextMixin mixin which lets you pass in
static_contextas a property of the view.:feature:`89` Added new AnonymousRequiredMixin which redirects authenticated users to another view.
:feature:`104` Added new AllVerbsMixin which allows a single method to response to all HTTP verbs.
:bug:`- major` Provided
JSONRequestResponseMixinas a mirror of JsonRequestResponseMixin because we’re not PHP.:feature:`107` FormValidMessageMixin, FormInvalidMessageMixin, and FormMessagesMixin all allow
ugettext_lazy-wrapped strings.:feature:`67` Extended PermissionRequiredMixin and MultiplePermissionsRequiredMixin to accept django-guardian-style custom/object permissions.
:bug:`95` Removed accidentally-added breakpoint.
:support:`96 backported` Added
build/to.gitignore:support:`59` Removed
CreateAndRedirectToEditViewmixin which was marked for deprecation and removal since 1.0.0.:feature:`51` Added JsonRequestResponseMixin which attempts to parse requests as JSON.
:feature:`61` Added CanonicalSlugDetailMixin mixin which allows for the specification of a canonical slug on a
DetailViewto help with SEO by redirecting on non-canonical requests.:feature:`76` Added UserPassesTestMixin mixin to replicate the behavior of Django’s
@user_passes_testdecorator.:bug:`- major` Some fixes for CanonicalSlugDetailMixin.
:feature:`92`
AccessMixinnow has a runtime-overridablelogin_urlattribute.:bug:`- major` Fixed problem with GroupRequiredMixin that made it not actually work.
:support:`-` All tests pass for Django versions 1.4 through 1.6 and Python versions 2.6, 2.7, and 3.3 (Django 1.4 and 1.5 not tested with Python 3.3).
:support:`-` Uses
six.string_typesinstead of explicitly relying onstrandunicodetypes.:bug:`-` Fix to allow
reverse_lazyto work for allAccessMixin-derived mixins.:feature:`57` FormValidMessageMixin which provides a
messagesmessage when the processed form is valid.:feature:`-` FormInvalidMessageMixin which provides a
messagesmessage when the processed form is invalid.:feature:`-` FormMessagesMixin which provides the functionality of both of the above mixins.
:feature:`-` GroupRequiredMixin which is a new access-level mixin which requires that a user be part of a specified group to access a view.
:bug:`52 major` JSONResponseMixin
.render_json_responsemethod updated to accept a status code.:bug:`43 major` JSONResponseMixin added
json_dumps_kwargsattribute & get method to pass args to the JSON encoder.:feature:`45` New OrderableListMixin allows ordering of list views by GET params.
:support:`-` Tests updated to test against latest stable Django release (1.5.1)
:support:`-` Small fixes and additions to documentation.
:feature:`-` New ‘abstract’
AccessMixinwhich provides overridableget_login_urlandget_redirect_field_namemethods for all access-based mixins.:feature:`32` Rewritten LoginRequiredMixin which provides same customization as other access mixins with
login_url,raise_exception&redirect_field_name.:feature:`33` New PrefetchRelatedMixin. Works the same as SelectRelatedMixin but uses Django’s
prefetch_relatedmethod.:support:`-`
CreateAndRedirectToEditViewis marked for deprecation.:bug:`- major` PermissionRequiredMixin no longer requires dot syntax for permission names.
:support:`-` Marked package as supporting 2.6 thru 3.3 (from rafales).
:support:`-` Fixes to documentation.
:support:`-` Tests to cover new additions and changes.
:support:`30 backported` Tests for all mixins (from rafales).
:feature:`26 backported` New CsrfExemptMixin for marking views as being CSRF exempt (from jarcoal).
:support:`- backported` Some documentation updates and a spelling error correction (from shabda).
:bug:`-` SuccessURLRedirectListMixin raises
ImproperlyConfiguredif nosuccess_list_urlattribute is supplied (from kennethlove).:bug:`25` Try importing the built-in
jsonmodule first, drop back to Django if necessary.:support:`- backported` Django 1.5 compatibility.
:bug:`21 major` Fixed signature of UserFormKwargsMixin
.get_form_kwargs:feature:`22` Updated JSONResponseMixin to work with non-ASCII characters and other datatypes (such as datetimes)
:bug:`- major` Fixed all mixins that have
raise_exceptionas an argument to properly raise aPermissionDeniedexception to allow for custom 403s.