File tree Expand file tree Collapse file tree 7 files changed +72
-0
lines changed Expand file tree Collapse file tree 7 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h1 > {{ object.name }}</ h1 >
5
+ < p > {{ object.salutation }}</ p >
6
+ < li > Email: {{ object.email }}</ li >
7
+ {% endblock content %}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h2 > Author List</ h2 >
5
+ < ul >
6
+ {% for author in object_list %}
7
+ < li > < a href ="{% url 'books:author_detail' author.id %} "> {{ author.name }}</ a > </ li >
8
+ {% endfor %}
9
+ </ ul >
10
+ {% endblock content %}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h1 > {{ object.title }}</ h1 >
5
+ < br />
6
+ < li > Authors:
7
+ {% for author in object.authors.all %}
8
+ {{ author }}
9
+ {% if not forloop.last %},{% else %}{% endif %}
10
+ {% endfor %}
11
+ </ li >
12
+ < li > Publisher: {{ object.publisher }}</ li >
13
+ < li > Publication date: {{ object.publication_date }}</ li >
14
+ {% endblock content %}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h2 > Book List</ h2 >
5
+ < ul >
6
+ {% for book in object_list %}
7
+ < li > < a href ="{% url 'books:book_detail' book.id %} "> {{ book.title }}</ a > </ li >
8
+ {% endfor %}
9
+ </ ul >
10
+ {% endblock content%}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h2 > Books Management System</ h2 >
5
+ < ul >
6
+ {% for modelname in object_list %}
7
+ {% with "books:"|add:modelname|lower|add:"_list" as urlvar %}
8
+ < li > < a href ="{% url urlvar %} "> {{ modelname }}</ a > </ li >
9
+ {% endwith %}
10
+ {% endfor %}
11
+ </ ul >
12
+
13
+ {% endblock %}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h1 > {{ object.name }}</ h1 >
5
+ < p > {{ object.website }}</ p >
6
+ < li > Address: {{ object.address }}</ li >
7
+ {% endblock content %}
Original file line number Diff line number Diff line change
1
+ {% extends "base_books.html" %}
2
+
3
+ {% block content %}
4
+ < h2 > Publisher List</ h2 >
5
+ < ul >
6
+ {% for publisher in object_list %}
7
+ < li > < a href ="{% url 'books:publisher_detail' publisher.id %} ">
8
+ {{ publisher.name }}</ a > </ li >
9
+ {% endfor %}
10
+ </ ul >
11
+ {% endblock content %}
You can’t perform that action at this time.
0 commit comments