Code

Ticket #4081: blank-flatpages-with-documentation.diff

File blank-flatpages-with-documentation.diff, 1.5 KB (added by mcroydon, 6 years ago)

Added note about new functionality in the documentation; also swapped out chicagocrime link for everyblock link

Line 
1Index: django/contrib/flatpages/models.py
2===================================================================
3--- django/contrib/flatpages/models.py  (revision 7270)
4+++ django/contrib/flatpages/models.py  (working copy)
5@@ -7,7 +7,7 @@
6     url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
7         help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
8     title = models.CharField(_('title'), max_length=200)
9-    content = models.TextField(_('content'))
10+    content = models.TextField(_('content'), blank=True)
11     enable_comments = models.BooleanField(_('enable comments'))
12     template_name = models.CharField(_('template name'), max_length=70, blank=True,
13         help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'."))
14Index: docs/flatpages.txt
15===================================================================
16--- docs/flatpages.txt  (revision 7270)
17+++ docs/flatpages.txt  (working copy)
18@@ -14,9 +14,14 @@
19 A flatpage can use a custom template or a default, systemwide flatpage
20 template. It can be associated with one, or multiple, sites.
21 
22+**New in Django development version**
23+
24+The content field may optionally be left blank if you prefer to put your
25+content in a custom template.
26+
27 Here are some examples of flatpages on Django-powered sites:
28 
29-    * http://www.chicagocrime.org/about/
30+    * http://www.everyblock.com/about/
31     * http://www.lawrence.com/about/contact/
32 
33 Installation