django-braces
Reusable, generic mixins for Django
What it is and what it does
django-braces is a collection of mixin classes designed to extend Django's class-based views with reusable behavior patterns. It bridges the gap between Django's function-based view decorators and class-based views by providing mixins that replicate decorator functionality and solve recurring design challenges in class-based view development.
The package is mature and stable, having been in use since 2012. It depends only on Django and installs with low friction. While it is no longer in active development and receives infrequent updates, it remains compatible with modern Python and Django versions, including Django LTS releases. The library is well-suited for projects that need proven, battle-tested view patterns without the overhead of more actively maintained alternatives.
Use it for:
- Add login-required checks to class-based views using LoginRequiredMixin instead of decorators.
- Enforce permission and group membership checks on views through reusable mixin composition.
- Handle common HTTP method restrictions and response patterns across multiple view classes.
- Replicate function-based view decorator behavior in class-based view hierarchies.
- Build consistent access control and authentication patterns across a Django application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides reusable mixin classes for Django class-based views, offering patterns that replicate function-based view decorators and solve common class-based view design problems.
Yes, if you use Django class-based views and want proven, stable mixin patterns. The package is mature, has no known vulnerabilities, and low install friction. The aging maintenance status is acceptable for a stable library that solves a well-defined problem, but verify that its mixin coverage matches your specific view patterns before adopting it.
Install
django-braces on PyPI
pip
pip install django-bracesuv
uv add django-bracespoetry
poetry add django-bracesInstalling django-braces
Before you install
Low install friction with a single Django dependency. Maintenance status is aging—the package is stable and time-tested but receives infrequent updates and is not in active development. Last release was 514 days ago; the repository remains active with recent commits.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical projects.
Quickstart
pip install django-braces
from django_braces.views import LoginRequiredMixin
from django.views.generic import TemplateView
class MyView(LoginRequiredMixin, TemplateView):
template_name = 'my_template.html'
Verify before relying
- Whether all documented mixins remain compatible with Django versions beyond 4.2 despite aging maintenance status.
- Specific mixin coverage—which common class-based view patterns are addressed by the library.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Django |
| Maintenance | aging — 514 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 397,505/month — #6,958 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_braces-1.17.0-py3-none-any.whl
Keywords: django, views, forms, mixins
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-annoyingProvides a collection of Django utility…
permissive · top 15,000 on PyPI
django-decorator-includeApplies decorators to Django URL patterns…
permissive · top 15,000 on PyPI
jasonProvides lightweight helper functions for…
copyleft · top 15,000 on PyPI
func_argsProvides sentinel values (REQ and OPT) and…
permissive · top 5,000 on PyPI
django-admin-extra-buttonsAdds custom buttons, links, and views to Django…
permissive · top 15,000 on PyPI
django-weasyprintProvides Django class-based views and response…
permissive · top 15,000 on PyPI
django-service-objectsProvides a Service base class for Django that…
permissive · top 15,000 on PyPI
django-model-utilsProvides reusable model mixins and field…
permissive · top 5,000 on PyPI
sqlalchemy-mixinsProvides Active Record-style mixins for…
permissive · top 15,000 on PyPI
drf-extensionsProvides mixins, decorators, and utilities that…
permissive · top 5,000 on PyPI