Fixed some flake8 errors from recent commits.

This commit is contained in:
Tim Graham 2014-02-15 11:21:15 -05:00
parent 1150053b99
commit 65b421c661
3 changed files with 6 additions and 5 deletions

View File

@ -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):

View File

@ -75,6 +75,7 @@ class Resolver404(Http404):
self.path = path
self.tried = tried
class NoReverseMatch(Exception):
pass

View File

@ -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 == '/'