diff --git a/src/lists/templates/base.html b/src/lists/templates/base.html new file mode 100644 index 0000000..af8c192 --- /dev/null +++ b/src/lists/templates/base.html @@ -0,0 +1,15 @@ + + + To-Do lists + + + +

{% block header_text %}{% endblock %}

+
+ + {% csrf_token %} +
+ {% block table %} + {% endblock %} + + \ No newline at end of file diff --git a/src/lists/templates/home.html b/src/lists/templates/home.html index fef18f5..34ad36d 100644 --- a/src/lists/templates/home.html +++ b/src/lists/templates/home.html @@ -1,12 +1,5 @@ - - - To-Do lists - - -

Your To-Do list

-
- - {% csrf_token %} -
- - \ No newline at end of file +{% extends 'base.html' %} + +{% block header_text %}Start a new To-Do list{% endblock %} + +{% block form_action %}/lists/new{% endblock %} \ No newline at end of file diff --git a/src/lists/templates/list.html b/src/lists/templates/list.html index f27d3bb..361391e 100644 --- a/src/lists/templates/list.html +++ b/src/lists/templates/list.html @@ -1,18 +1,13 @@ - - - To-Do lists - - -

Your To-Do list

-
- - {% csrf_token %} -
+{% extends 'base.html' %} - - {% for item in list.item_set.all %} - - {% endfor %} -
{{ forloop.counter }}: {{ item.text }}
- - \ No newline at end of file +{% block header_text %}Your To-Do list{% endblock %} + +{% block form_action %}/lists/{{ list.id }}/add_item{% endblock %} + +{% block table %} + + {% for item in list.item_set.all %} + + {% endfor %} +
{{ forloop.counter }}: {{ item.text }}
+{% endblock %} \ No newline at end of file