django-brackets
django-brackets is a small collection of mixins for your class-based
views' needs. Heavily based on django-braces, brackets aims to be
a simpler API and lighter tool set than braces was.
django-brackets is developed against and for still-supported versions
of Django and the latest (or near enough) version of Python. It also
offers mixins for django-rest-framework which should work with the
latest release of that package.
As always, contributions are welcome.
Available mixins
(in alphabetical order)
Django class-based views
AllVerbsMixin- View answers any HTTP verb with a single method.AnonymousRequiredMixin- Authenticated users are rejected.CacheControlMixin- Control how the view is cachedCSRFExemptMixin- View does not require CSRF tokens.FormWithUserMixin- Automatically provides the requesting user to the form.GroupRequiredMixin- Requesting user must be part of a group.HeaderMixin- Statically set headers for a view.LoginRequiredMixin- Non-authenticated users are rejected.MultipleFormsMixin- View handles multiple forms at once. Taken fromdjango-shapeshifterNeverCacheMixin- Mark a view as being uncached.OrderableListMixin- Allow queryset ordering via query string arguments.PassesTestMixin- Requests must pass a test before they are dispatched.PassOrRedirectMixin- Failing requests are redirected to another view.PermissionRequiredMixin- Requesting user must have specific permissions.PrefetchRelatedMixin- Addprefetch_relatedclauses into the view's queryset.RecentLoginRequiredMixin- Users must have logged in recently.RedirectMixin- Easily redirect requests.RedirectToLoginMixin- Redirect requests to a login page.SelectRelatedMixin- Addselect_relatedclauses into the view's queryset.SSLRequiredMixin- Requests must be secure or redirected.StaffUserRequiredMixin- Requesting user must be a staff member.StaticContextMixin- Provide a static context to a view.SuperuserRequiredMixin- Requesting user must be a superuser.
Django REST Framework
MultipleSerializersMixin- View/Viewset can have multiple serializers.
Django forms
UserFormMixin- Expects a"user"keyword argument, which will becomeself.user.
Metadata
Release files for django-brackets 2024
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_brackets-2024.tar.gz | 37.7 kB | Without provenance | Details for django_brackets-2024.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_brackets-2024-py3-none-any.whl | Python 3 | none | any | Details for django_brackets-2024-py3-none-any.whl |
Total release size: 59.2 kB
Release files / django_brackets-2024.tar.gz
| Download URL | django_brackets-2024.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9203e55605eb23a757764488621d3fb8f514c8c733e92162fa00ad26a16882bd
|
|
BLAKE2b-256 checksum How to use checksums |
f46d569551594e10a7c7adb3f441aa39a7d9bdd3b13a288ff1904574d9f87b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Release files / django_brackets-2024-py3-none-any.whl
| Download URL | django_brackets-2024-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3011806fdda21961318cfffdb50452ca142caaaa5bba82ca29ffb879e8e1dda5
|
|
BLAKE2b-256 checksum How to use checksums |
d2892052ac6a63bd0fbb5b01647b70ca8d5a40859ebbcd7305831b22b54b3a25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Security for django-brackets 2024
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.