Here are the generic mixins we've been using a lot lately. If you have any that you find useful, feel free to send them to us in a pull request. Please include example usage.
http://django-braces.readthedocs.org/en/latest/index.html
Fork, make a change, update the docs, make a pull request.
Add yourself to CONTRIBUTORS.txt if you want.
All development dependencies are available in requirements.txt file.
To run the test suite, execute the following in your shell (Django install is required):
py.test --cov=braces --cov-report=html
- New 'abstract'
AccessMixinwhich provides overridableget_login_urlandget_redirect_field_name methodsfor all access-based mixins. - Rewritten
LoginRequiredMixinwhich provides same customization as other access mixins withlogin_url,raise_exception&redirect_field_name. - New
PrefetchRelatedMixin. Works the same asSelectRelatedMixinbut uses Django'sprefetch_relatedmethod. CreateAndRedirectToEditViewis marked for deprecation.PermissionRequiredMixinno longer requires dot syntax for permission names.- Marked package as supporting 2.6 thru 3.3 (from rafales).
- Fixes to documentation.
- Tests to cover new additions and changes.
- Tests for all mixins (from rafales).
- New
CsrfExemptMixinfor marking views as being CSRF exempt (from jarcoal). - Some documentation updates and a spelling error correction (from shabda).
SuccessURLRedirectListMixinraisesImproperlyConfiguredif nosuccess_list_urlattribute is supplied (from kennethlove).
- Try importing the built-in json module first, drop back to Django if necessary. Django 1.5 compatibility.
- Fixed signature of
UserFormKwargsMixin.get_form_kwargs - Updated
JSONResponseMixinto work with non-ASCII characters and other datatypes (such as datetimes) - Fixed all mixins that have
raise_exceptionas an argument to properly raise aPermissionDeniedexception to allow for custom 403s.