django-braces

Reusable, generic mixins for Django

BSD-3-CLAUSE License

Downloads
286.1K
Stars
1.9K
Committers
76

Bot releases are hidden (Show)

django-braces - v1.15.0 Latest Release

Published by kennethlove almost 3 years ago

django-braces - v1.14.0

Published by kennethlove almost 5 years ago

django-braces -

Published by kennethlove almost 5 years ago

django-braces -

Published by kennethlove almost 5 years ago

django-braces -

Published by kennethlove almost 5 years ago

django-braces -

Published by kennethlove almost 5 years ago

django-braces - 1.9.0

Published by kennethlove over 8 years ago

  • [Feature] #203: Use Django’s supplied version of six to remove an external dependency.
  • [Bug] #161: Fixed redirect loop for users without proper groups for MultipleGroupRequiredMixin and GroupRequiredMixin.
  • [Bug] #181: Fixed redirect loops based on user permissions.
  • [Bug] #196: Refactor how users without permissions are handled.
  • [Bug] #208: Fixed errors from combining certain access mixins.
  • [Support]: Added note to docs about Python and Django versions used in tests.
  • [Support] #192: Added example for OrderableListView.
  • [Support] #201: Fixed typo in SuccessURLRedirectListMixin.
  • [Support] #202: Fixed typo in PermissionsRequiredMixin and MultiplePermissionsRequiredMixin.
  • [Support] #209: Fixed link to Django documentation for user_passes_test decorator.
django-braces -

Published by kennethlove over 9 years ago

  • #145 Allow custom exceptions to be raised by all AccessMixins.
  • #171 New SSLRequiredMixin. Redirect http -> https.
  • #138 New RecentLoginRequiredMixin to require user sessions to have a given freshness.
  • #164 Use resolve_url to handle LOGIN_REDIRECT_URLs in settings.py that are just URL names.
  • #130 New attribute on JSONResponseMixin to allow setting a custom JSON encoder class.
  • #131 New attribute on LoginRequiredMixin so it's possible to redirect unauthenticated users while
    using AccessMixin-derived mixins instead of throwing an exception.
django-braces - 1.4.0

Published by chrisjones-brack3t over 10 years ago

  • Split views.py out into multiple files since it was approaching 1000 LoC.
  • SetHeadlineMixin now accepts headline with ugettext_lazy()-wrapped strings.
  • Fixed a bug where JSONResponseMixin would override the content_type of Django's TemplateView in Django 1.6.
  • Fixed bug in PermissionRequiredMixin where if PermissionRequiredMixin.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's contrib.messages messages. FormValidMessageMixin and FormInvalidMessageMixin 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 in static_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 of JsonRequestResponseMixin because we're not PHP.
  • FormValidMessageMixin, FormInvalidMessageMixin, and FormMessagesMixin all allow ugettext_lazy-wrapped strings.
  • Extended PermissionRequiredMixin and MultiplePermissionsRequiredMixin to accept django-guardian-style custom/object permissions.
django-braces - 1.3.1

Published by kennethlove almost 11 years ago

  • Removed breakpoint that was added accidentally.
  • Added the build directory to .gitignore
django-braces - 1.3.0

Published by kennethlove almost 11 years ago

  • 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 a DetailView 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-overridable login_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.
django-braces - 1.2.2

Published by kennethlove about 11 years ago

  • Uses six.string_types instead of explicitly relying on str and unicode types.
    This fixes a problem with Python 3.
django-braces - 1.2.1

Published by kennethlove about 11 years ago

  • Fix to allow reverse_lazy to work for all AccessMixin-derived mixins.
django-braces - v1.2.0

Published by kennethlove about 11 years ago

  • 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.
django-braces - 1.1.0

Published by kennethlove over 11 years ago

1.1.0 Release

  • 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.
  • 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.
Package Rankings
Top 26.16% on Conda-forge.org
Top 1.26% on Pypi.org
Badges
Extracted from project README
PyPI version codecov