diff --git a/django-diary/source_code_final/entries/templates/entries/base.html b/django-diary/source_code_final/entries/templates/entries/base.html index 7ae979a73f..11cded607a 100644 --- a/django-diary/source_code_final/entries/templates/entries/base.html +++ b/django-diary/source_code_final/entries/templates/entries/base.html @@ -1,30 +1,26 @@ {% load static %} - - - - My Diary - - - - -

Dear diary …

- - {% if messages %} - - {% endif %} - - {% block content %}{% endblock %} - -
- Logout - - - \ No newline at end of file + + + My Diary + + + +

+ Dear diary … +

+ {% if messages %} + + {% endif %} + {% block content %} + {% endblock content %} +
+
+ {% csrf_token %} + +
+ + diff --git a/django-diary/source_code_final/entries/templates/entries/entry_confirm_delete.html b/django-diary/source_code_final/entries/templates/entries/entry_confirm_delete.html index adece2c949..92b36ec747 100644 --- a/django-diary/source_code_final/entries/templates/entries/entry_confirm_delete.html +++ b/django-diary/source_code_final/entries/templates/entries/entry_confirm_delete.html @@ -1,8 +1,10 @@ {% extends "entries/base.html" %} {% block content %} -
{% csrf_token %} + + {% csrf_token %}

- Are you sure you want to delete "{{ entry.title }}"
+ Are you sure you want to delete + "{{ entry.title }}" created on {{ entry.date_created|date:'Y-m-d' }}?

@@ -10,4 +12,4 @@ -{% endblock %} \ No newline at end of file +{% endblock content %} diff --git a/django-diary/source_code_final/entries/templates/entries/entry_detail.html b/django-diary/source_code_final/entries/templates/entries/entry_detail.html index 803af78ac4..0822dae4ba 100644 --- a/django-diary/source_code_final/entries/templates/entries/entry_detail.html +++ b/django-diary/source_code_final/entries/templates/entries/entry_detail.html @@ -1,14 +1,12 @@ {% extends "entries/base.html" %} - {% block content %}

{{ entry.date_created|date:'Y-m-d H:i' }}

{{ entry.title }}

{{ entry.content }}

- -

- ✍️ Edit - ⛔ Delete -

-{% endblock %} \ No newline at end of file +

+ ✍️ Edit + ⛔ Delete +

+{% endblock content %} diff --git a/django-diary/source_code_final/entries/templates/entries/entry_form.html b/django-diary/source_code_final/entries/templates/entries/entry_form.html index f3fc9e0517..a3d379692f 100644 --- a/django-diary/source_code_final/entries/templates/entries/entry_form.html +++ b/django-diary/source_code_final/entries/templates/entries/entry_form.html @@ -1,16 +1,17 @@ {% extends "entries/base.html" %} {% block content %} - {% csrf_token %} + + {% csrf_token %} {{ form.as_p }}
{% if entry %} - + {% else %} - + {% endif %} -{% endblock %} \ No newline at end of file +{% endblock content %} diff --git a/django-diary/source_code_final/entries/templates/entries/entry_list.html b/django-diary/source_code_final/entries/templates/entries/entry_list.html index 9c6e07e767..bf5949f15d 100644 --- a/django-diary/source_code_final/entries/templates/entries/entry_list.html +++ b/django-diary/source_code_final/entries/templates/entries/entry_list.html @@ -1,20 +1,19 @@ {% extends "entries/base.html" %} - {% block content %}
-

{% now "Y-m-d H:i" %}

- +

+ {% now "Y-m-d H:i" %} +

+ + + +
+{% for entry in entry_list %} +
+

{{ entry.date_created|date:'Y-m-d H:i' }}

+

+ {{ entry.title }} +

- {% for entry in entry_list %} -
-

- {{ entry.date_created|date:'Y-m-d H:i' }} -

-

- - {{ entry.title }} - -

-
- {% endfor %} -{% endblock %} +{% endfor %} +{% endblock content %} diff --git a/django-diary/source_code_step_3/entries/templates/entries/entry_detail.html b/django-diary/source_code_step_3/entries/templates/entries/entry_detail.html index 8290b891e9..546592c967 100644 --- a/django-diary/source_code_step_3/entries/templates/entries/entry_detail.html +++ b/django-diary/source_code_step_3/entries/templates/entries/entry_detail.html @@ -2,4 +2,4 @@

{{ entry.date_created|date:'Y-m-d H:i' }}

{{ entry.title }}

{{ entry.content }}

- \ No newline at end of file + diff --git a/django-diary/source_code_step_3/entries/templates/entries/entry_list.html b/django-diary/source_code_step_3/entries/templates/entries/entry_list.html index 3b18493683..7bee2797f5 100644 --- a/django-diary/source_code_step_3/entries/templates/entries/entry_list.html +++ b/django-diary/source_code_step_3/entries/templates/entries/entry_list.html @@ -1,12 +1,8 @@ {% for entry in entry_list %}
-

- {{ entry.date_created|date:'Y-m-d H:i' }} -

+

{{ entry.date_created|date:'Y-m-d H:i' }}

- - {{ entry.title }} - + {{ entry.title }}

-{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/django-diary/source_code_step_4/entries/templates/entries/base.html b/django-diary/source_code_step_4/entries/templates/entries/base.html index b3c5014592..e0a5b4befa 100644 --- a/django-diary/source_code_step_4/entries/templates/entries/base.html +++ b/django-diary/source_code_step_4/entries/templates/entries/base.html @@ -1,18 +1,16 @@ {% load static %} - - - - My Diary - - - - -

Dear diary …

- - {% block content %}{% endblock %} - - - - \ No newline at end of file + + + My Diary + + + +

+ Dear diary … +

+ {% block content %} + {% endblock content %} + + diff --git a/django-diary/source_code_step_4/entries/templates/entries/entry_detail.html b/django-diary/source_code_step_4/entries/templates/entries/entry_detail.html index e868da42ad..9dc5160199 100644 --- a/django-diary/source_code_step_4/entries/templates/entries/entry_detail.html +++ b/django-diary/source_code_step_4/entries/templates/entries/entry_detail.html @@ -1,9 +1,8 @@ {% extends "entries/base.html" %} - {% block content %}

{{ entry.date_created|date:'Y-m-d H:i' }}

{{ entry.title }}

{{ entry.content }}

-{% endblock %} \ No newline at end of file +{% endblock content %} diff --git a/django-diary/source_code_step_4/entries/templates/entries/entry_list.html b/django-diary/source_code_step_4/entries/templates/entries/entry_list.html index c50e961901..f12a2159df 100644 --- a/django-diary/source_code_step_4/entries/templates/entries/entry_list.html +++ b/django-diary/source_code_step_4/entries/templates/entries/entry_list.html @@ -1,16 +1,11 @@ {% extends "entries/base.html" %} - {% block content %} {% for entry in entry_list %}
-

- {{ entry.date_created|date:'Y-m-d H:i' }} -

+

{{ entry.date_created|date:'Y-m-d H:i' }}

- - {{ entry.title }} - + {{ entry.title }}

{% endfor %} -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_5/entries/templates/entries/base.html b/django-diary/source_code_step_5/entries/templates/entries/base.html index cc8bfd52d8..e0a5b4befa 100644 --- a/django-diary/source_code_step_5/entries/templates/entries/base.html +++ b/django-diary/source_code_step_5/entries/templates/entries/base.html @@ -1,18 +1,16 @@ {% load static %} - - - - My Diary - - - - -

Dear diary …

- - {% block content %}{% endblock %} - - - + + + My Diary + + + +

+ Dear diary … +

+ {% block content %} + {% endblock content %} + diff --git a/django-diary/source_code_step_5/entries/templates/entries/entry_confirm_delete.html b/django-diary/source_code_step_5/entries/templates/entries/entry_confirm_delete.html index c5a6a674d8..92b36ec747 100644 --- a/django-diary/source_code_step_5/entries/templates/entries/entry_confirm_delete.html +++ b/django-diary/source_code_step_5/entries/templates/entries/entry_confirm_delete.html @@ -1,8 +1,10 @@ {% extends "entries/base.html" %} {% block content %} -
{% csrf_token %} + + {% csrf_token %}

- Are you sure you want to delete "{{ entry.title }}"
+ Are you sure you want to delete + "{{ entry.title }}" created on {{ entry.date_created|date:'Y-m-d' }}?

@@ -10,4 +12,4 @@ -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_5/entries/templates/entries/entry_detail.html b/django-diary/source_code_step_5/entries/templates/entries/entry_detail.html index 2b994a1a8a..9dc5160199 100644 --- a/django-diary/source_code_step_5/entries/templates/entries/entry_detail.html +++ b/django-diary/source_code_step_5/entries/templates/entries/entry_detail.html @@ -1,9 +1,8 @@ {% extends "entries/base.html" %} - {% block content %}

{{ entry.date_created|date:'Y-m-d H:i' }}

{{ entry.title }}

{{ entry.content }}

-{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_5/entries/templates/entries/entry_form.html b/django-diary/source_code_step_5/entries/templates/entries/entry_form.html index 468762bc06..a3d379692f 100644 --- a/django-diary/source_code_step_5/entries/templates/entries/entry_form.html +++ b/django-diary/source_code_step_5/entries/templates/entries/entry_form.html @@ -1,16 +1,17 @@ {% extends "entries/base.html" %} {% block content %} - {% csrf_token %} + + {% csrf_token %} {{ form.as_p }}
{% if entry %} - + {% else %} - + {% endif %} -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_5/entries/templates/entries/entry_list.html b/django-diary/source_code_step_5/entries/templates/entries/entry_list.html index c50e961901..f12a2159df 100644 --- a/django-diary/source_code_step_5/entries/templates/entries/entry_list.html +++ b/django-diary/source_code_step_5/entries/templates/entries/entry_list.html @@ -1,16 +1,11 @@ {% extends "entries/base.html" %} - {% block content %} {% for entry in entry_list %}
-

- {{ entry.date_created|date:'Y-m-d H:i' }} -

+

{{ entry.date_created|date:'Y-m-d H:i' }}

- - {{ entry.title }} - + {{ entry.title }}

{% endfor %} -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_6/entries/templates/entries/base.html b/django-diary/source_code_step_6/entries/templates/entries/base.html index fc24724313..fae99f3412 100644 --- a/django-diary/source_code_step_6/entries/templates/entries/base.html +++ b/django-diary/source_code_step_6/entries/templates/entries/base.html @@ -1,28 +1,21 @@ {% load static %} - - - - My Diary - - - - -

Dear diary …

- - {% if messages %} - - {% endif %} - - {% block content %}{% endblock %} - - - + + + My Diary + + + +

+ Dear diary … +

+ {% if messages %} + + {% endif %} + {% block content %} + {% endblock content %} + diff --git a/django-diary/source_code_step_6/entries/templates/entries/entry_confirm_delete.html b/django-diary/source_code_step_6/entries/templates/entries/entry_confirm_delete.html index c5a6a674d8..92b36ec747 100644 --- a/django-diary/source_code_step_6/entries/templates/entries/entry_confirm_delete.html +++ b/django-diary/source_code_step_6/entries/templates/entries/entry_confirm_delete.html @@ -1,8 +1,10 @@ {% extends "entries/base.html" %} {% block content %} -
{% csrf_token %} + + {% csrf_token %}

- Are you sure you want to delete "{{ entry.title }}"
+ Are you sure you want to delete + "{{ entry.title }}" created on {{ entry.date_created|date:'Y-m-d' }}?

@@ -10,4 +12,4 @@ -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_6/entries/templates/entries/entry_detail.html b/django-diary/source_code_step_6/entries/templates/entries/entry_detail.html index 1c74c58af3..0822dae4ba 100644 --- a/django-diary/source_code_step_6/entries/templates/entries/entry_detail.html +++ b/django-diary/source_code_step_6/entries/templates/entries/entry_detail.html @@ -1,14 +1,12 @@ {% extends "entries/base.html" %} - {% block content %}

{{ entry.date_created|date:'Y-m-d H:i' }}

{{ entry.title }}

{{ entry.content }}

- -

- ✍️ Edit - ⛔ Delete -

-{% endblock %} +

+ ✍️ Edit + ⛔ Delete +

+{% endblock content %} diff --git a/django-diary/source_code_step_6/entries/templates/entries/entry_form.html b/django-diary/source_code_step_6/entries/templates/entries/entry_form.html index 468762bc06..a3d379692f 100644 --- a/django-diary/source_code_step_6/entries/templates/entries/entry_form.html +++ b/django-diary/source_code_step_6/entries/templates/entries/entry_form.html @@ -1,16 +1,17 @@ {% extends "entries/base.html" %} {% block content %} - {% csrf_token %} + + {% csrf_token %} {{ form.as_p }}
{% if entry %} - + {% else %} - + {% endif %} -{% endblock %} +{% endblock content %} diff --git a/django-diary/source_code_step_6/entries/templates/entries/entry_list.html b/django-diary/source_code_step_6/entries/templates/entries/entry_list.html index 9c6e07e767..bf5949f15d 100644 --- a/django-diary/source_code_step_6/entries/templates/entries/entry_list.html +++ b/django-diary/source_code_step_6/entries/templates/entries/entry_list.html @@ -1,20 +1,19 @@ {% extends "entries/base.html" %} - {% block content %}
-

{% now "Y-m-d H:i" %}

- +

+ {% now "Y-m-d H:i" %} +

+ + + +
+{% for entry in entry_list %} +
+

{{ entry.date_created|date:'Y-m-d H:i' }}

+

+ {{ entry.title }} +

- {% for entry in entry_list %} -
-

- {{ entry.date_created|date:'Y-m-d H:i' }} -

-

- - {{ entry.title }} - -

-
- {% endfor %} -{% endblock %} +{% endfor %} +{% endblock content %}