fixed flake8 errors

This commit is contained in:
Asif Saifuddin Auvi 2018-05-10 22:22:00 +06:00
parent cf822c745b
commit c34a0dab19
3 changed files with 4 additions and 0 deletions

View file

@ -78,6 +78,7 @@ def _create_multiwidget(widget_class, copy_attributes=(), init_arguments=()):
return multiwidget
return create_new_multiwidget
# this dictionary keeps a mapping from django's widget classes to a callable
# that will accept an instance of this class. It will return a new instance of
# a corresponding floppyforms widget, with the same semantics -- all relevant

View file

@ -27,6 +27,7 @@ class ChoicesAsLinksWidget(django_widgets.Select):
"""Select form widget taht renders links for choices
instead of select element with options.
"""
def render(self, name, value, attrs=None, choices=()):
links = []
for choice_value, choice_label in chain(self.choices, choices):
@ -49,6 +50,7 @@ class NullBooleanLinksWidget(
('3', ugettext_lazy('No')),
]
#: Maps `django_filter`'s field filters types to our
#: custom form widget.
FILTER_TYPE_TO_WIDGET = {

View file

@ -12,6 +12,7 @@ from djadmin2.views import LoginView
class CustomLoginView(LoginView):
default_template_name = "custom_login_template.html"
djadmin2_site.login_view = CustomLoginView
djadmin2_site.autodiscover()