Skip to content

Commit 1f56ed7

Browse files
committed
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
1 parent 6edcd11 commit 1f56ed7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/ref/contrib/flatpages.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ Flatpage templates
126126
==================
127127

128128
By default, flatpages are rendered via the template
129-
:file:`flatpages/default.html`, but you can override that for a particular
130-
flatpage.
129+
:file:`flatpages/default.html`, but you can override that for a
130+
particular flatpage: in the admin, a collapsed fieldset titled
131+
"Advanced options" (clicking will expand it) contains a field for
132+
specifying a template name. If you're creating a flat page via the
133+
Python API you can simply set the template name as the field
134+
``template_name`` on the ``FlatPage`` object.
131135

132136
Creating the :file:`flatpages/default.html` template is your responsibility;
133137
in your template directory, just create a :file:`flatpages` directory

0 commit comments

Comments
 (0)