File tree Expand file tree Collapse file tree 20 files changed +147
-175
lines changed
source_code_final/entries/templates/entries
source_code_step_3/entries/templates/entries
source_code_step_4/entries/templates/entries
source_code_step_5/entries/templates/entries
source_code_step_6/entries/templates/entries Expand file tree Collapse file tree 20 files changed +147
-175
lines changed Original file line number Diff line number Diff line change 11{% load static %}
22<!DOCTYPE html>
33< html lang ="en ">
4-
5- < head >
6- < meta charset ="UTF-8 ">
7- < title > My Diary</ title >
8- < link rel ="stylesheet " href ="{% static 'css/diary.css' %} ">
9- </ head >
10-
11- < body >
12- < h1 > < a href ="/ "> Dear diary …</ a > </ h1 >
13-
14- {% if messages %}
15- < ul class ="messages ">
16- {% for message in messages %}
17- < li class ="message ">
18- {{ message }}
19- </ li >
20- {% endfor %}
21- </ ul >
22- {% endif %}
23-
24- {% block content %}{% endblock %}
25-
26- < hr >
27- < a href ="{% url 'admin:logout' %} "> Logout</ a >
28- </ body >
29-
30- </ html >
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < title > My Diary</ title >
7+ < link rel ="stylesheet " href ="{% static 'css/diary.css' %} ">
8+ </ head >
9+ < body >
10+ < h1 >
11+ < a href ="/ "> Dear diary …</ a >
12+ </ h1 >
13+ {% if messages %}
14+ < ul class ="messages ">
15+ {% for message in messages %}< li class ="message "> {{ message }}</ li > {% endfor %}
16+ </ ul >
17+ {% endif %}
18+ {% block content %}
19+ {% endblock content %}
20+ < hr >
21+ < form method ="post " action ="{% url 'admin:logout' %} ">
22+ {% csrf_token %}
23+ < input type ="submit " value ="Logout " />
24+ </ form >
25+ </ body >
26+ </ html >
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
22{% block content %}
3- < form method ="post "> {% csrf_token %}
3+ < form method ="post ">
4+ {% csrf_token %}
45 < p >
5- Are you sure you want to delete < em > "{{ entry.title }}"</ em > < br >
6+ Are you sure you want to delete
7+ < em > "{{ entry.title }}"</ em >
68 created on {{ entry.date_created|date:'Y-m-d' }}?
79 </ p >
810 < input type ="submit " value ="Confirm ">
911 </ form >
1012 < a href ="{% url 'entry-detail' entry.id %} ">
1113 < button > Cancel</ button >
1214 </ a >
13- {% endblock %}
15+ {% endblock content %}
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
2-
32{% block content %}
43 < article >
54 < h2 > {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
65 < h3 > {{ entry.title }}</ h3 >
76 < p > {{ entry.content }}</ p >
87 </ article >
9-
10- < p >
11- < a href ="{% url 'entry-update' entry.id %} "> ✍️ Edit</ a >
12- < a href ="{% url 'entry-delete' entry.id %} "> ⛔ Delete</ a >
13- </ p >
14- {% endblock %}
8+ < p >
9+ < a href ="{% url 'entry-update' entry.id %} "> ✍️ Edit</ a >
10+ < a href ="{% url 'entry-delete' entry.id %} "> ⛔ Delete</ a >
11+ </ p >
12+ {% endblock content %}
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
22{% block content %}
3- < form method ="post "> {% csrf_token %}
3+ < form method ="post ">
4+ {% csrf_token %}
45 {{ form.as_p }}
56 < input type ="submit " value ="Save ">
67 </ form >
78 {% if entry %}
89 < a href ="{% url 'entry-detail' entry.id %} ">
9- < button > Cancel</ button >
10+ < button > Cancel</ button >
1011 </ a >
1112 {% else %}
1213 < a href ="{% url 'entry-list' %} ">
13- < button > Cancel</ button >
14+ < button > Cancel</ button >
1415 </ a >
1516 {% endif %}
16- {% endblock %}
17+ {% endblock content %}
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
2-
32{% block content %}
43 < article >
5- < h2 class ="mark "> {% now "Y-m-d H:i" %}</ em > </ h2 >
6- < a href ="{% url 'entry-create' %} "> < button > Add new entry</ button > </ a >
4+ < h2 class ="mark ">
5+ {% now "Y-m-d H:i" %}</ em >
6+ </ h2 >
7+ < a href ="{% url 'entry-create' %} ">
8+ < button > Add new entry</ button >
9+ </ a >
10+ </ article >
11+ {% for entry in entry_list %}
12+ < article >
13+ < h2 class ="{{ entry.date_created|date:'l' }} "> {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
14+ < h3 >
15+ < a href ="{% url 'entry-detail' entry.id %} "> {{ entry.title }}</ a >
16+ </ h3 >
717 </ article >
8- {% for entry in entry_list %}
9- < article >
10- < h2 class ="{{ entry.date_created|date:'l' }} ">
11- {{ entry.date_created|date:'Y-m-d H:i' }}
12- </ h2 >
13- < h3 >
14- < a href ="{% url 'entry-detail' entry.id %} ">
15- {{ entry.title }}
16- </ a >
17- </ h3 >
18- </ article >
19- {% endfor %}
20- {% endblock %}
18+ {% endfor %}
19+ {% endblock content %}
Original file line number Diff line number Diff line change 22 < h2 > {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
33 < h3 > {{ entry.title }}</ h3 >
44 < p > {{ entry.content }}</ p >
5- </ article >
5+ </ article >
Original file line number Diff line number Diff line change 11{% for entry in entry_list %}
22 < article >
3- < h2 class ="{{ entry.date_created|date:'l' }} ">
4- {{ entry.date_created|date:'Y-m-d H:i' }}
5- </ h2 >
3+ < h2 class ="{{ entry.date_created|date:'l' }} "> {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
64 < h3 >
7- < a href ="{% url 'entry-detail' entry.id %} ">
8- {{ entry.title }}
9- </ a >
5+ < a href ="{% url 'entry-detail' entry.id %} "> {{ entry.title }}</ a >
106 </ h3 >
117 </ article >
12- {% endfor %}
8+ {% endfor %}
Original file line number Diff line number Diff line change 11{% load static %}
22<!DOCTYPE html>
33< html lang ="en ">
4-
5- < head >
6- < meta charset ="UTF-8 ">
7- < title > My Diary</ title >
8- < link rel ="stylesheet " href ="{% static 'css/diary.css' %} ">
9- </ head >
10-
11- < body >
12- < h1 > < a href ="/ "> Dear diary …</ a > </ h1 >
13-
14- {% block content %}{% endblock %}
15-
16- </ body >
17-
18- </ html >
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < title > My Diary</ title >
7+ < link rel ="stylesheet " href ="{% static 'css/diary.css' %} ">
8+ </ head >
9+ < body >
10+ < h1 >
11+ < a href ="/ "> Dear diary …</ a >
12+ </ h1 >
13+ {% block content %}
14+ {% endblock content %}
15+ </ body >
16+ </ html >
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
2-
32{% block content %}
43 < article >
54 < h2 > {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
65 < h3 > {{ entry.title }}</ h3 >
76 < p > {{ entry.content }}</ p >
87 </ article >
9- {% endblock %}
8+ {% endblock content %}
Original file line number Diff line number Diff line change 11{% extends "entries/base.html" %}
2-
32{% block content %}
43 {% for entry in entry_list %}
54 < article >
6- < h2 class ="{{ entry.date_created|date:'l' }} ">
7- {{ entry.date_created|date:'Y-m-d H:i' }}
8- </ h2 >
5+ < h2 class ="{{ entry.date_created|date:'l' }} "> {{ entry.date_created|date:'Y-m-d H:i' }}</ h2 >
96 < h3 >
10- < a href ="{% url 'entry-detail' entry.id %} ">
11- {{ entry.title }}
12- </ a >
7+ < a href ="{% url 'entry-detail' entry.id %} "> {{ entry.title }}</ a >
138 </ h3 >
149 </ article >
1510 {% endfor %}
16- {% endblock %}
11+ {% endblock content %}
You can’t perform that action at this time.
0 commit comments