summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/checks.py2
-rw-r--r--django/contrib/flatpages/forms.py14
-rw-r--r--django/contrib/flatpages/models.py5
-rw-r--r--django/contrib/gis/gdal/prototypes/raster.py3
-rw-r--r--django/views/generic/dates.py6
5 files changed, 19 insertions, 11 deletions
diff --git a/django/contrib/admin/checks.py b/django/contrib/admin/checks.py
index 48539fe9e5..62c3710cdb 100644
--- a/django/contrib/admin/checks.py
+++ b/django/contrib/admin/checks.py
@@ -58,7 +58,7 @@ def check_dependencies(**kwargs):
"'django.contrib.auth.context_processors.auth' must be in "
"TEMPLATES in order to use the admin application.",
id="admin.E402"
- )
+ )
errors.append(missing_template)
return errors
diff --git a/django/contrib/flatpages/forms.py b/django/contrib/flatpages/forms.py
index b990fa36de..19f3b6309c 100644
--- a/django/contrib/flatpages/forms.py
+++ b/django/contrib/flatpages/forms.py
@@ -5,12 +5,16 @@ from django.utils.translation import ugettext, ugettext_lazy as _
class FlatpageForm(forms.ModelForm):
- url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$',
- help_text=_("Example: '/about/contact/'. Make sure to have leading"
- " and trailing slashes."),
+ url = forms.RegexField(
+ label=_("URL"),
+ max_length=100,
+ regex=r'^[-\w/\.~]+$',
+ help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."),
error_messages={
- "invalid": _("This value must contain only letters, numbers,"
- " dots, underscores, dashes, slashes or tildes."),
+ "invalid": _(
+ "This value must contain only letters, numbers, dots, "
+ "underscores, dashes, slashes or tildes."
+ ),
},
)
diff --git a/django/contrib/flatpages/models.py b/django/contrib/flatpages/models.py
index 67e1a30bac..b3cad733aa 100644
--- a/django/contrib/flatpages/models.py
+++ b/django/contrib/flatpages/models.py
@@ -13,7 +13,10 @@ class FlatPage(models.Model):
title = models.CharField(_('title'), max_length=200)
content = models.TextField(_('content'), blank=True)
enable_comments = models.BooleanField(_('enable comments'), default=False)
- template_name = models.CharField(_('template name'), max_length=70, blank=True,
+ template_name = models.CharField(
+ _('template name'),
+ max_length=70,
+ blank=True,
help_text=_(
"Example: 'flatpages/contact_page.html'. If this isn't provided, "
"the system will use 'flatpages/default.html'."
diff --git a/django/contrib/gis/gdal/prototypes/raster.py b/django/contrib/gis/gdal/prototypes/raster.py
index 4058e1912a..8b3c3504d4 100644
--- a/django/contrib/gis/gdal/prototypes/raster.py
+++ b/django/contrib/gis/gdal/prototypes/raster.py
@@ -62,7 +62,8 @@ get_band_ds = voidptr_output(std_call('GDALGetBandDataset'), [c_void_p])
get_band_datatype = int_output(std_call('GDALGetRasterDataType'), [c_void_p])
get_band_nodata_value = double_output(std_call('GDALGetRasterNoDataValue'), [c_void_p, POINTER(c_int)])
set_band_nodata_value = void_output(std_call('GDALSetRasterNoDataValue'), [c_void_p, c_double])
-get_band_statistics = void_output(std_call('GDALGetRasterStatistics'),
+get_band_statistics = void_output(
+ std_call('GDALGetRasterStatistics'),
[
c_void_p, c_int, c_int, POINTER(c_double), POINTER(c_double),
POINTER(c_double), POINTER(c_double), c_void_p, c_void_p,
diff --git a/django/views/generic/dates.py b/django/views/generic/dates.py
index d403db8207..52b3b39062 100644
--- a/django/views/generic/dates.py
+++ b/django/views/generic/dates.py
@@ -658,11 +658,11 @@ class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailV
if not self.get_allow_future() and date > datetime.date.today():
raise Http404(_(
"Future %(verbose_name_plural)s not available because "
- "%(class_name)s.allow_future is False.") % {
+ "%(class_name)s.allow_future is False."
+ ) % {
'verbose_name_plural': qs.model._meta.verbose_name_plural,
'class_name': self.__class__.__name__,
- },
- )
+ })
# Filter down a queryset from self.queryset using the date from the
# URL. This'll get passed as the queryset to DetailView.get_object,