mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
fixed flake8 errors
This commit is contained in:
parent
cf822c745b
commit
c34a0dab19
3 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue