Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4081 -- Allow empty content in flatpages.

Patch from ctrochalakis and Matt Croydon.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4b93eed185c52a422bea3e73fe215db7c2746595 1 parent 339df5c
Malcolm Tredinnick authored June 30, 2008
2  django/contrib/flatpages/models.py
@@ -8,7 +8,7 @@ class FlatPage(models.Model):
8 8
     url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
9 9
         help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
10 10
     title = models.CharField(_('title'), max_length=200)
11  
-    content = models.TextField(_('content'))
  11
+    content = models.TextField(_('content'), blank=True)
12 12
     enable_comments = models.BooleanField(_('enable comments'))
13 13
     template_name = models.CharField(_('template name'), max_length=70, blank=True,
14 14
         help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'."))
7  docs/flatpages.txt
@@ -14,9 +14,14 @@ custom Django application.
14 14
 A flatpage can use a custom template or a default, systemwide flatpage
15 15
 template. It can be associated with one, or multiple, sites.
16 16
 
  17
+**New in Django development version**
  18
+
  19
+The content field may optionally be left blank if you prefer to put your 
  20
+content in a custom template.
  21
+
17 22
 Here are some examples of flatpages on Django-powered sites:
18 23
 
19  
-    * http://www.chicagocrime.org/about/
  24
+    * http://www.everyblock.com/about/
20 25
     * http://www.lawrence.com/about/contact/
21 26
 
22 27
 Installation

0 notes on commit 4b93eed

Please sign in to comment.
Something went wrong with that request. Please try again.