Fixed #11883: Documented how to set a custom template name on a flatpage.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
James Bennett 2010-03-03 08:34:31 +00:00
parent 6edcd11aed
commit 1f56ed7319
1 changed files with 6 additions and 2 deletions

View File

@ -126,8 +126,12 @@ Flatpage templates
==================
By default, flatpages are rendered via the template
:file:`flatpages/default.html`, but you can override that for a particular
flatpage.
:file:`flatpages/default.html`, but you can override that for a
particular flatpage: in the admin, a collapsed fieldset titled
"Advanced options" (clicking will expand it) contains a field for
specifying a template name. If you're creating a flat page via the
Python API you can simply set the template name as the field
``template_name`` on the ``FlatPage`` object.
Creating the :file:`flatpages/default.html` template is your responsibility;
in your template directory, just create a :file:`flatpages` directory