From 3c17bf6bcf8622100da0dda6465f5148627d91d8 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Thu, 30 Dec 2010 01:08:16 -0500 Subject: Createing template inheritence, adding recipe details model. --- greenbox/templates/base_generic.html | 66 ++++++++++++++++++++++++++++ greenbox/templates/recipe/recipe_detail.html | 19 ++++++++ greenbox/templates/recipe/recipe_list.html | 9 +++- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 greenbox/templates/base_generic.html create mode 100644 greenbox/templates/recipe/recipe_detail.html diff --git a/greenbox/templates/base_generic.html b/greenbox/templates/base_generic.html new file mode 100644 index 0000000..29e05b2 --- /dev/null +++ b/greenbox/templates/base_generic.html @@ -0,0 +1,66 @@ + + + {% block page_title %}Home{% endblock %} :: the Green Box + + + + +

the Green Box

+
+

{% block title %}{% endblock %}

+ {% block contents %}{% endblock %} +
+ + diff --git a/greenbox/templates/recipe/recipe_detail.html b/greenbox/templates/recipe/recipe_detail.html new file mode 100644 index 0000000..8f1fa1b --- /dev/null +++ b/greenbox/templates/recipe/recipe_detail.html @@ -0,0 +1,19 @@ +{% extends "base_generic.html" %} +{% load ingredientformat %} + +{% block page_title %}{{ object.title }}{% endblock %} +{% block title %}{{ object.title }}{% endblock %} + +{% block contents %} +
{{ object.description|linebreaks }}
+ +

Ingredients

+ + +

Directions

+{{ object.instructions|linenumbers|linebreaks }} +{% endblock %} diff --git a/greenbox/templates/recipe/recipe_list.html b/greenbox/templates/recipe/recipe_list.html index 3ceae72..b942284 100644 --- a/greenbox/templates/recipe/recipe_list.html +++ b/greenbox/templates/recipe/recipe_list.html @@ -1,5 +1,12 @@ +{% extends "base_generic.html" %} + +{% block page_title %}Recipe List{% endblock %} +{% block title %}Recipe List{% endblock %} + +{% block contents %} +{% endblock %} -- cgit v1.2.3