Skip to content

Commit

Permalink
New release 1.15.0 (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethlove authored Nov 5, 2021
1 parent 26c9aaa commit 1d4bb0d
Show file tree
Hide file tree
Showing 28 changed files with 1,120 additions and 871 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ venv/
.pytest_cache/
.tool-versions
pytest-coverage.txt
coverage.xml
coverage.xml
.vscode/
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# django-braces

Mixins for Django's class-based views.
`django-braces` provides useful Mixins for Django's class-based views.
Most of these mixins replicate the behavior of Django's function-based view
decorators. Others solve common headaches with working with class-based views.
You can read more in [the documentation](https://django-braces.readthedocs.io/en/latest/index.html).

![Build](https://github.com/brack3t/django-braces/actions/workflows/ci.yml/badge.svg?branch=main)
[![PyPI version](https://badge.fury.io/py/django-braces.svg)](http://badge.fury.io/py/django-braces)
[![codecov](https://codecov.io/gh/brack3t/django-braces/branch/main/graph/badge.svg?token=aBhzbsyyTi)](https://codecov.io/gh/brack3t/django-braces)

## Documentation
## Notes

[Read The Docs](https://django-braces.readthedocs.io/en/latest/index.html)
`django-braces` is stable and time-tested. It does not receive a lot of updates
and is not in active development.

## Installation

Install from PyPI with `pip`:
`pip install django-braces`
`django-braces` also only officially supports Python version that are still
receiving fixes and Django LTS versions. `django-braces` will work with most
modern version of Python and Django, however.

## Building the Docs
## Installation

1. Install docs requirements: `pip install -r requirements-docs.txt`.
2. `cd docs`.
3. `make html`.
4. Open `_build/index.html` in your browser.
Install from PyPI with `pip`: `pip install django-braces`

## Contributing

Expand All @@ -30,20 +30,9 @@ Add yourself to `CONTRIBUTORS.txt` if you want.

All development dependencies are available in `requirements.txt` file.

To run the test suite, please install `tox` and as many Python interpreters as you'd
like to test against. Currently we test against 2.7, 3.6, 3.7, and 3.8. We recommend
using `asdf` to install various Python versions.

Once `tox` and Python(s) are installed, you can execute the entire suite by running
just the `tox` command.
To run the test suite, please install `pytest` and run `pytest` at the root
of the repository.

## Change Log

[Changelog on Read The Docs](https://django-braces.readthedocs.io/en/latest/changelog.html)

## Supported Django Versions

Our policy is that `django-braces` officially supports, and is tested on, all versions
that Django [officially supports](https://www.djangoproject.com/download/#supported-versions).
You are free to use `django-braces` with any version of Django you wish (so long as it has
class-based views) but no support will be promised.
10 changes: 5 additions & 5 deletions braces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
:license: BSD 3-clause. See LICENSE for more details
"""

__title__ = 'braces'
__version__ = '1.14.0'
__author__ = 'Kenneth Love and Chris Jones'
__license__ = 'BSD 3-clause'
__copyright__ = 'Copyright 2013 Kenneth Love and Chris Jones'
__title__ = "braces"
__version__ = "1.15.0"
__author__ = "Kenneth Love and Chris Jones"
__license__ = "BSD 3-clause"
__copyright__ = "Copyright 2013 Kenneth Love and Chris Jones"
3 changes: 2 additions & 1 deletion braces/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class UserKwargModelFormMixin(object):
expecting these kwargs to be passed in, so they must be popped off before
anything else is done.
"""

def __init__(self, *args, **kwargs):
self.user = kwargs.pop("user", None) # Pop the user off the
# passed in kwargs.
# passed in kwargs.
super(UserKwargModelFormMixin, self).__init__(*args, **kwargs)
66 changes: 33 additions & 33 deletions braces/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
SuperuserRequiredMixin,
UserPassesTestMixin,
SSLRequiredMixin,
RecentLoginRequiredMixin
RecentLoginRequiredMixin,
)
from ._ajax import (
AjaxResponseMixin,
JSONRequestResponseMixin,
JSONResponseMixin,
JsonRequestResponseMixin
JsonRequestResponseMixin,
)
from ._forms import (
CsrfExemptMixin,
Expand All @@ -30,42 +30,42 @@
CanonicalSlugDetailMixin,
SetHeadlineMixin,
StaticContextMixin,
HeaderMixin
HeaderMixin,
)
from ._queries import (
OrderableListMixin,
PrefetchRelatedMixin,
SelectRelatedMixin
SelectRelatedMixin,
)

__all__ = [
'AjaxResponseMixin',
'AllVerbsMixin',
'AnonymousRequiredMixin',
'CanonicalSlugDetailMixin',
'CsrfExemptMixin',
'FormInvalidMessageMixin',
'FormMessagesMixin',
'FormValidMessageMixin',
'GroupRequiredMixin',
'HeaderMixin',
'JSONRequestResponseMixin',
'JsonRequestResponseMixin',
'JSONResponseMixin',
'LoginRequiredMixin',
'MessageMixin',
'MultiplePermissionsRequiredMixin',
'OrderableListMixin',
'PermissionRequiredMixin',
'PrefetchRelatedMixin',
'SelectRelatedMixin',
'SetHeadlineMixin',
'StaffuserRequiredMixin',
'StaticContextMixin',
'SuccessURLRedirectListMixin',
'SuperuserRequiredMixin',
'UserFormKwargsMixin',
'UserPassesTestMixin',
'SSLRequiredMixin',
'RecentLoginRequiredMixin'
"AjaxResponseMixin",
"AllVerbsMixin",
"AnonymousRequiredMixin",
"CanonicalSlugDetailMixin",
"CsrfExemptMixin",
"FormInvalidMessageMixin",
"FormMessagesMixin",
"FormValidMessageMixin",
"GroupRequiredMixin",
"HeaderMixin",
"JSONRequestResponseMixin",
"JsonRequestResponseMixin",
"JSONResponseMixin",
"LoginRequiredMixin",
"MessageMixin",
"MultiplePermissionsRequiredMixin",
"OrderableListMixin",
"PermissionRequiredMixin",
"PrefetchRelatedMixin",
"SelectRelatedMixin",
"SetHeadlineMixin",
"StaffuserRequiredMixin",
"StaticContextMixin",
"SuccessURLRedirectListMixin",
"SuperuserRequiredMixin",
"UserFormKwargsMixin",
"UserPassesTestMixin",
"SSLRequiredMixin",
"RecentLoginRequiredMixin",
]
Loading

0 comments on commit 1d4bb0d

Please sign in to comment.