mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Clean up E208 errors
This commit is contained in:
parent
e68856de7b
commit
4ef3107b5f
@ -260,7 +260,7 @@ class TestObjectList(TestCase):
|
||||
|
||||
class TestFieldPanel(TestCase):
|
||||
def setUp(self):
|
||||
self.EventPageForm = get_form_for_model(EventPage, formsets = [])
|
||||
self.EventPageForm = get_form_for_model(EventPage, formsets=[])
|
||||
self.event = EventPage(title='Abergavenny sheepdog trials',
|
||||
date_from=date(2014, 7, 20), date_to=date(2014, 7, 21))
|
||||
|
||||
|
@ -35,7 +35,7 @@ def set_privacy(request, page_id):
|
||||
else:
|
||||
# create a new restriction object
|
||||
PageViewRestriction.objects.create(
|
||||
page=page, password = form.cleaned_data['password'])
|
||||
page=page, password=form.cleaned_data['password'])
|
||||
|
||||
return render_modal_workflow(
|
||||
request, None, 'wagtailadmin/page_privacy/set_privacy_done.js', {
|
||||
|
@ -227,7 +227,7 @@ class RawHTMLBlock(FieldBlock):
|
||||
def __init__(self, required=True, help_text=None, max_length=None, min_length=None, **kwargs):
|
||||
self.field = forms.CharField(
|
||||
required=required, help_text=help_text, max_length=max_length, min_length=min_length,
|
||||
widget = forms.Textarea)
|
||||
widget=forms.Textarea)
|
||||
super(RawHTMLBlock, self).__init__(**kwargs)
|
||||
|
||||
def render_basic(self, value):
|
||||
|
@ -54,7 +54,7 @@ def editor_js():
|
||||
@hooks.register('register_permissions')
|
||||
def register_permissions():
|
||||
document_content_type = ContentType.objects.get(app_label='wagtaildocs', model='document')
|
||||
document_permissions = Permission.objects.filter(content_type = document_content_type)
|
||||
document_permissions = Permission.objects.filter(content_type=document_content_type)
|
||||
return document_permissions
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ def check_old_style_urlconf():
|
||||
# wagtail.wagtailimages.admin_urls is loaded to, resulting in the wagtailimages_serve path
|
||||
# being equal to wagtailimages_index followed by three arbitrary args
|
||||
try:
|
||||
wagtailimages_serve_path = urlresolvers.reverse('wagtailimages_serve', args = ['123', '456', '789'])
|
||||
wagtailimages_serve_path = urlresolvers.reverse('wagtailimages_serve', args=['123', '456', '789'])
|
||||
except urlresolvers.NoReverseMatch:
|
||||
# wagtailimages_serve is not defined at all, so there's no collision
|
||||
OLD_STYLE_URLCONF_CHECK_PASSED = True
|
||||
@ -97,7 +97,7 @@ def editor_js():
|
||||
@hooks.register('register_permissions')
|
||||
def register_permissions():
|
||||
image_content_type = ContentType.objects.get(app_label='wagtailimages', model='image')
|
||||
image_permissions = Permission.objects.filter(content_type = image_content_type)
|
||||
image_permissions = Permission.objects.filter(content_type=image_content_type)
|
||||
return image_permissions
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ def create(request):
|
||||
form = SiteForm(request.POST)
|
||||
if form.is_valid():
|
||||
site = form.save()
|
||||
messages.success(request, _("Site '{0}' created.").format(site.hostname), buttons = [
|
||||
messages.success(request, _("Site '{0}' created.").format(site.hostname), buttons=[
|
||||
messages.button(reverse('wagtailsites_edit', args=(site.id,)), _('Edit'))
|
||||
])
|
||||
return redirect('wagtailsites_index')
|
||||
@ -50,7 +50,7 @@ def edit(request, site_id):
|
||||
form = SiteForm(request.POST, instance=site)
|
||||
if form.is_valid():
|
||||
site = form.save()
|
||||
messages.success(request, _("Site '{0}' updated.").format(site.hostname), buttons = [
|
||||
messages.success(request, _("Site '{0}' updated.").format(site.hostname), buttons=[
|
||||
messages.button(reverse('wagtailsites_edit', args=(site.id,)), _('Edit'))
|
||||
])
|
||||
return redirect('wagtailsites_index')
|
||||
|
@ -84,7 +84,7 @@ def create(request):
|
||||
group = form.save()
|
||||
formset.instance = group
|
||||
formset.save()
|
||||
messages.success(request, _("Group '{0}' created.").format(group), buttons = [
|
||||
messages.success(request, _("Group '{0}' created.").format(group), buttons=[
|
||||
messages.button(reverse('wagtailusers_groups_edit', args=(group.id,)), _('Edit'))
|
||||
])
|
||||
return redirect('wagtailusers_groups_index')
|
||||
@ -109,7 +109,7 @@ def edit(request, group_id):
|
||||
if form.is_valid() and formset.is_valid():
|
||||
group = form.save()
|
||||
formset.save()
|
||||
messages.success(request, _("Group '{0}' updated.").format(group), buttons = [
|
||||
messages.success(request, _("Group '{0}' updated.").format(group), buttons=[
|
||||
messages.button(reverse('wagtailusers_groups_edit', args=(group.id,)), _('Edit'))
|
||||
])
|
||||
return redirect('wagtailusers_groups_index')
|
||||
|
Loading…
Reference in New Issue
Block a user