Releases: brack3t/django-braces
Releases · brack3t/django-braces
1.4.0
- Split
views.py
out into multiple files since it was approaching 1000 LoC. SetHeadlineMixin
now acceptsheadline
withugettext_lazy()
-wrapped strings.- Fixed a bug where
JSONResponseMixin
would override thecontent_type
of Django'sTemplateView
in Django 1.6. - Fixed bug in
PermissionRequiredMixin
where ifPermissionRequiredMixin.no_permissions_fail
returned a false-y value, the user lacking the permission would pass instead of being denied access. - Added doc for how to contribute.
- Added
MessageMixin
to allow easier access to Django'scontrib.messages
messages.FormValidMessageMixin
andFormInvalidMessageMixin
were updated to use it. - Fixed bug in
CanonicalSlugDetailMixin
to allow it to use custom URL kwargs. - Fixed bug in
GroupRequiredMixin
where superusers were blocked by lack of group memberships. - Fixed bug in
GroupRequiredMixin
which now correctly checks for group membership against a list. - Added new
StaticContextMixin
mixin which lets you pass instatic_context
as a property of the view. - Added new
AnonymousRequiredMixin
which redirects authenticated users to another view. - Added new
AllVerbsMixin
which allows a single method to response to all HTTP verbs. - Provided
JSONRequestResponseMixin
as a mirror ofJsonRequestResponseMixin
because we're not PHP. FormValidMessageMixin
,FormInvalidMessageMixin
, andFormMessagesMixin
all allowugettext_lazy
-wrapped strings.- Extended
PermissionRequiredMixin
andMultiplePermissionsRequiredMixin
to accept django-guardian-style custom/object permissions.
1.3.1
- Removed breakpoint that was added accidentally.
- Added the build directory to .gitignore
1.3.0
- Removed
CreateAndRedirectToEditView
mixin. It was marked for deprecation and removal since 1.0. - Added
JsonRequestAndResponseMixin
mixin which attempts to parse requests as JSON. - Added
CanonicalSlugDetailMixin
mixin which allows for the specification of a canonical slug on aDetailView
to help with SEO by redirecting on non-canonical requests. - Added
UserPassesTestMixin
mixin to replicate the behavior of Django's@user_passes_test
decorator. - Some fixes for
CanonicalSlugDetailMixin
. AccessMixin
now has a runtime-overridablelogin_url
attribute.- Fixed problem with
GroupRequiredMixin
that made it not actually work. - 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).
- Tests and documentation changes for all of the above.
1.2.2
- Uses
six.string_types
instead of explicitly relying onstr
andunicode
types.
This fixes a problem with Python 3.
1.2.1
- Fix to allow
reverse_lazy
to work for allAccessMixin
-derived mixins.
v1.2.0
FormValidMessageMixin
which provides amessages
message when the processed form is valid.FormInvalidMessageMixin
which provides amessages
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.
1.1.0
1.1.0 Release
JSONResponseMixin.render_json_response
method updated to accept a status code.JSONResponseMixin
addedjson_dumps_kwargs
attribute & get method to pass args to the json encoder.- New
OrderableListMixin
allows ordering of list views by GET params. - Tests updated to test against latest stable Django release (1.5.1)
- Small fixes and additions to documentation.