From bfe6fb45cceb85e4a6afd707cea8783dad77228f Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Sun, 21 Jun 2015 18:39:47 -0400 Subject: [PATCH] Add basic blog template to tutorial. Seems like an oversight since they soon tell you to "adjust" it. --- docs/getting_started/tutorial.rst | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/tutorial.rst b/docs/getting_started/tutorial.rst index da77746552..3de3fe61cc 100644 --- a/docs/getting_started/tutorial.rst +++ b/docs/getting_started/tutorial.rst @@ -136,6 +136,25 @@ The following example defines a basic blog post model in ``blog/models.py`` FieldPanel('body', classname="full") ] +Create a template at ``blog/templates/blog/blog_page.html``: + +.. code:: html+django + + {% extends "base.html" %} + + {% load static core_tags wagtailcore_tags %} + + {% block body_class %}templage-blogpage{% endblock %} + + {% block content %} +

{{ self.title }}

+

{{ self.date }}

+ +
{{ self.intro }}
+ + {{ self.body | richtext }} + {% endblock %} + Run ``python manage.py makemigrations`` and ``python manage.py migrate``. .. figure:: ../_static/images/tutorial/tutorial_4.png @@ -185,7 +204,7 @@ model: FieldPanel('body'), ] -Adjust your BlogPage template to output the image: +Adjust your blog page template to include the image: .. code:: html+django @@ -206,7 +225,6 @@ Adjust your BlogPage template to output the image:
{{ self.intro }}
{{ self.body | richtext }} - {% endblock %} .. figure:: ../_static/images/tutorial/tutorial_6.png