Fixed all E261 warnings
This commit is contained in:
@@ -8,7 +8,7 @@ from django.template.context import RequestContext
|
|||||||
from django.utils.crypto import constant_time_compare
|
from django.utils.crypto import constant_time_compare
|
||||||
from django.contrib.formtools.utils import form_hmac
|
from django.contrib.formtools.utils import form_hmac
|
||||||
|
|
||||||
AUTO_ID = 'formtools_%s' # Each form here uses this as its auto_id parameter.
|
AUTO_ID = 'formtools_%s' # Each form here uses this as its auto_id parameter.
|
||||||
|
|
||||||
|
|
||||||
class FormPreview(object):
|
class FormPreview(object):
|
||||||
@@ -42,7 +42,7 @@ class FormPreview(object):
|
|||||||
try:
|
try:
|
||||||
self.form.base_fields[name]
|
self.form.base_fields[name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
break # This field name isn't being used by the form.
|
break # This field name isn't being used by the form.
|
||||||
name += '_'
|
name += '_'
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ class FormPreview(object):
|
|||||||
if f.is_valid():
|
if f.is_valid():
|
||||||
if not self._check_security_hash(request.POST.get(self.unused_name('hash'), ''),
|
if not self._check_security_hash(request.POST.get(self.unused_name('hash'), ''),
|
||||||
request, f):
|
request, f):
|
||||||
return self.failed_hash(request) # Security hash failed.
|
return self.failed_hash(request) # Security hash failed.
|
||||||
return self.done(request, f.cleaned_data)
|
return self.done(request, f.cleaned_data)
|
||||||
else:
|
else:
|
||||||
return render_to_response(self.form_template,
|
return render_to_response(self.form_template,
|
||||||
|
|||||||
Reference in New Issue
Block a user