mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
339df5ce44
commit
4b93eed185
|
@ -8,7 +8,7 @@ class FlatPage(models.Model):
|
||||||
url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
|
url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
|
||||||
help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
|
help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
|
||||||
title = models.CharField(_('title'), max_length=200)
|
title = models.CharField(_('title'), max_length=200)
|
||||||
content = models.TextField(_('content'))
|
content = models.TextField(_('content'), blank=True)
|
||||||
enable_comments = models.BooleanField(_('enable comments'))
|
enable_comments = models.BooleanField(_('enable comments'))
|
||||||
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'."))
|
help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'."))
|
||||||
|
|
|
@ -14,9 +14,14 @@ custom Django application.
|
||||||
A flatpage can use a custom template or a default, systemwide flatpage
|
A flatpage can use a custom template or a default, systemwide flatpage
|
||||||
template. It can be associated with one, or multiple, sites.
|
template. It can be associated with one, or multiple, sites.
|
||||||
|
|
||||||
|
**New in Django development version**
|
||||||
|
|
||||||
|
The content field may optionally be left blank if you prefer to put your
|
||||||
|
content in a custom template.
|
||||||
|
|
||||||
Here are some examples of flatpages on Django-powered sites:
|
Here are some examples of flatpages on Django-powered sites:
|
||||||
|
|
||||||
* http://www.chicagocrime.org/about/
|
* http://www.everyblock.com/about/
|
||||||
* http://www.lawrence.com/about/contact/
|
* http://www.lawrence.com/about/contact/
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
|
Loading…
Reference in New Issue