diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 20857a9fa6..870eb8f4d0 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -679,6 +679,7 @@ Contributors * Vallabh Tiwari * dr-rompecabezas * Rishabh jain +* Jhonatan Lopes Translators =========== diff --git a/docs/getting_started/tutorial.md b/docs/getting_started/tutorial.md index 760008e960..c98e2c4889 100644 --- a/docs/getting_started/tutorial.md +++ b/docs/getting_started/tutorial.md @@ -694,14 +694,16 @@ Edit one of your `BlogPage` instances, and you should now be able to tag posts: To render tags on a `BlogPage`, add this to `blog_page.html`: ```html+django -{% if page.tags.all.count %} -
-

Tags

- {% for tag in page.tags.all %} - - {% endfor %} -
-{% endif %} +{% with tags=page.tags.all %} + {% if tags %} +
+

Tags

+ {% for tag in tags %} + + {% endfor %} +
+ {% endif %} +{% endwith %} ``` Notice that we're linking to pages here with the builtin `slugurl`