X-Git-Url: http://git.tremily.us/?p=cookbook.git;a=blobdiff_plain;f=example%2Fdata%2Ftemplate%2Fcookbook%2Frecipe.html;fp=example%2Fdata%2Ftemplate%2Fcookbook%2Frecipe.html;h=eb0f5e4445eb3f82d709b6ab11bb4c9d326726de;hp=0000000000000000000000000000000000000000;hb=364935709467c654cc1c079212ec939438935d6f;hpb=458baf4d02a354dab67843b6228b158d4148f2c1 diff --git a/example/data/template/cookbook/recipe.html b/example/data/template/cookbook/recipe.html new file mode 100644 index 0000000..eb0f5e4 --- /dev/null +++ b/example/data/template/cookbook/recipe.html @@ -0,0 +1,58 @@ +{% extends "cookbook/base.html" %} + +{% block content %} +

{{ recipe.name }}

+ +{% block metadata %} + + +{% if recipe.source or recipe.url %} + +{% endif %} +{% if recipe.x_yield %} + +{% endif %} +{% if recipe.tags.all %} + + + +{% endif %} +
Author{{ recipe.author|default:"unknown" }}
Source{{ recipe.source|default:recipe.url }}
Yield{{ recipe.x_yield }}
Tags +{% for tag in recipe.tags.all %} + {{ tag }} +{% endfor %} +
+{% endblock %} + +{% block ingredients %} +

Ingredients

+ +{% for ingredient_block in recipe.ingredientblock_set.all %} +
+

{{ ingredient_block.name }}

+ +{% if ingredient_block.directions %} +

Directions

+ +
+{{ ingredient_block.directions|safe }} +
+{% endif %} + +
+{% endfor %} +{% endblock %} + +{% block directions %} +

Directions

+ +
+{{ recipe.directions|safe }} +
+{% endblock %} + +{% endblock %}