summaryrefslogtreecommitdiff
path: root/django/contrib/flatpages
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/flatpages')
-rw-r--r--django/contrib/flatpages/forms.py14
-rw-r--r--django/contrib/flatpages/models.py5
2 files changed, 13 insertions, 6 deletions
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'."