mirror of https://github.com/django/django.git
Fixed some flake8 errors from recent commits.
This commit is contained in:
parent
1150053b99
commit
65b421c661
|
@ -96,8 +96,8 @@ class BaseModelAdminChecks(object):
|
|||
]
|
||||
|
||||
return list(chain(*[
|
||||
self._check_field_spec(cls, model, field_name, 'fields')
|
||||
for field_name in cls.fields
|
||||
self._check_field_spec(cls, model, field_name, 'fields')
|
||||
for field_name in cls.fields
|
||||
]))
|
||||
|
||||
def _check_fieldsets(self, cls, model):
|
||||
|
@ -145,8 +145,8 @@ class BaseModelAdminChecks(object):
|
|||
)
|
||||
]
|
||||
return list(chain(*[
|
||||
self._check_field_spec(cls, model, fields, '%s[1][\'fields\']' % label)
|
||||
for fields in fieldset[1]['fields']
|
||||
self._check_field_spec(cls, model, fieldset_fields, '%s[1][\'fields\']' % label)
|
||||
for fieldset_fields in fieldset[1]['fields']
|
||||
]))
|
||||
|
||||
def _check_field_spec(self, cls, model, fields, label):
|
||||
|
|
|
@ -75,6 +75,7 @@ class Resolver404(Http404):
|
|||
self.path = path
|
||||
self.tried = tried
|
||||
|
||||
|
||||
class NoReverseMatch(Exception):
|
||||
pass
|
||||
|
||||
|
|
|
@ -479,7 +479,7 @@ def technical_404_response(request, exception):
|
|||
error_url = exception.path
|
||||
except AttributeError:
|
||||
tried = []
|
||||
error_url = request.path_info[1:] # Trim leading slash
|
||||
error_url = request.path_info[1:] # Trim leading slash
|
||||
else:
|
||||
if (not tried # empty URLconf
|
||||
or (request.path == '/'
|
||||
|
|
Loading…
Reference in New Issue