kopia lustrzana https://github.com/wagtail/wagtail
Clean up W291 errors
rodzic
304f8f8e66
commit
62d77e3aa1
|
@ -54,7 +54,7 @@ def get_backends(backend_settings=None, backends=None):
|
|||
return backend_objects
|
||||
|
||||
|
||||
def purge_url_from_cache(url, backend_settings=None, backends=None):
|
||||
def purge_url_from_cache(url, backend_settings=None, backends=None):
|
||||
for backend_name, backend in get_backends(backend_settings=backend_settings, backends=backends).items():
|
||||
logger.info("[%s] Purging URL: %s", backend_name, url)
|
||||
backend.purge(url)
|
||||
|
|
|
@ -729,7 +729,7 @@ class BaseStreamFieldPanel(BaseFieldPanel):
|
|||
classes.append("stream-field")
|
||||
|
||||
# BaseFieldPanel is essentially for single fields, which are rendered on the front end
|
||||
# with the assumption that the label (singular) will always be promoted to the full-width
|
||||
# with the assumption that the label (singular) will always be promoted to the full-width
|
||||
# divider bar thing.
|
||||
# This results in all the other labels being promoted similarly, so it's better not to
|
||||
# treat this as a single field, and remove the "single-field" class.
|
||||
|
|
|
@ -70,7 +70,7 @@ def widgettype(bound_field):
|
|||
except AttributeError:
|
||||
try:
|
||||
return camelcase_to_underscore(bound_field.widget.__class__.__name__)
|
||||
except AttributeError:
|
||||
except AttributeError:
|
||||
return ""
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from django.shortcuts import render, redirect
|
|||
from django.contrib import messages
|
||||
from django.contrib.auth.forms import SetPasswordForm
|
||||
from django.contrib.auth.views import logout as auth_logout, login as auth_login
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
from django.views.decorators.cache import never_cache
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class RecentEditsPanel(object):
|
|||
"""
|
||||
select wp.* FROM
|
||||
wagtailcore_pagerevision wp JOIN (
|
||||
SELECT max(created_at) as max_created_at, page_id FROM wagtailcore_pagerevision group by page_id
|
||||
SELECT max(created_at) as max_created_at, page_id FROM wagtailcore_pagerevision group by page_id
|
||||
) as max_rev on max_rev.max_created_at = wp.created_at and wp.user_id = %s order by wp.created_at desc
|
||||
""", [request.user.id])[:5]
|
||||
def render(self):
|
||||
|
|
|
@ -19,7 +19,7 @@ def get_document_json(document):
|
|||
"""
|
||||
|
||||
return json.dumps({
|
||||
'id': document.id,
|
||||
'id': document.id,
|
||||
'title': document.title,
|
||||
'edit_link': reverse('wagtaildocs_edit_document', args=(document.id,)),
|
||||
})
|
||||
|
|
|
@ -365,7 +365,7 @@ class TestIssue312(TestCase):
|
|||
# Now manually duplicate the renditon and check that the database blocks it
|
||||
self.assertRaises(
|
||||
IntegrityError,
|
||||
Rendition.objects.create,
|
||||
Rendition.objects.create,
|
||||
image=rend1.image,
|
||||
filter=rend1.filter,
|
||||
width=rend1.width,
|
||||
|
|
|
@ -62,7 +62,7 @@ def add(request):
|
|||
form = ImageForm({
|
||||
'title': request.FILES['files[]'].name,
|
||||
}, {
|
||||
'file': request.FILES['files[]'],
|
||||
'file': request.FILES['files[]'],
|
||||
})
|
||||
|
||||
if form.is_valid():
|
||||
|
|
|
@ -7,10 +7,10 @@ from wagtail.wagtailsearch import models
|
|||
|
||||
|
||||
class QueryForm(forms.Form):
|
||||
query_string = forms.CharField(label=_('Search term(s)/phrase'),
|
||||
help_text=_("""Enter the full search string to match. An
|
||||
exact match is required for your Editors Picks to be
|
||||
displayed, wildcards are NOT allowed."""),
|
||||
query_string = forms.CharField(label=_("Search term(s)/phrase"),
|
||||
help_text=_("Enter the full search string to match. An "
|
||||
"exact match is required for your Editors Picks to be "
|
||||
"displayed, wildcards are NOT allowed."),
|
||||
required=True)
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue