Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/modernizing-braces #277

Merged
merged 11 commits into from Nov 15, 2021
2 changes: 1 addition & 1 deletion braces/__init__.py
Expand Up @@ -2,7 +2,7 @@
django-braces mixins library
----------------------------

Several mixins for making Django's generic class-based views more useful.
Mixins to make Django's generic class-based views simpler.

:copyright: (c) 2013 by Kenneth Love and Chris Jones
:license: BSD 3-clause. See LICENSE for more details
Expand Down
6 changes: 3 additions & 3 deletions braces/forms.py
@@ -1,4 +1,4 @@
class UserKwargModelFormMixin(object):
class UserKwargModelFormMixin:
"""
Generic model form mixin for popping user out of the kwargs and
attaching it to the instance.
Expand All @@ -9,6 +9,6 @@ class UserKwargModelFormMixin(object):
"""

def __init__(self, *args, **kwargs):
self.user = kwargs.pop("user", None) # Pop the user off the
# passed in kwargs.
"""Remove the user from **kwargs and assign it on the object"""
self.user = kwargs.pop("user", None)
super(UserKwargModelFormMixin, self).__init__(*args, **kwargs)
kennethlove marked this conversation as resolved.
Show resolved Hide resolved