Last change
on this file since 17ed1da was 17ed1da, checked in by ManuelTrajcev <manueltrajcev7@…>, 4 weeks ago |
get_num_song_from_genr for a given customer QUERRY
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | <!DOCTYPE html>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <title>Number of tracks from each genre per Customer</title>
|
---|
5 | </head>
|
---|
6 | <body>
|
---|
7 | <h1>Number of tracks from each genre per Customer</h1>
|
---|
8 |
|
---|
9 | <form method="GET" action="">
|
---|
10 | <label for="customer_id">Select Customer:</label>
|
---|
11 | <select name="customer_id" id="customer_id">
|
---|
12 | <option value="">All Customers</option>
|
---|
13 | {% for customer in customers %}
|
---|
14 | <option value="{{ customer.customer_id }}"
|
---|
15 | {% if request.GET.customer_id == customer.0|stringformat:'s' %}selected{% endif %}>
|
---|
16 | {{ customer.first_name }} {{ customer.last_name }}
|
---|
17 | </option>
|
---|
18 | {% endfor %}
|
---|
19 | </select>
|
---|
20 | <button type="submit">Filter</button>
|
---|
21 | </form>
|
---|
22 |
|
---|
23 | <h4>First Name Last Name - Genre - Num of Tracks</h4>
|
---|
24 |
|
---|
25 | <ol>
|
---|
26 | {% for row in data %}
|
---|
27 | <li>
|
---|
28 | {{ row.first_name }} - {{ row.last_name }} - {{ row.genre }} - {{ row.track_count }}</li>
|
---|
29 | {% endfor %}
|
---|
30 | </ol>
|
---|
31 |
|
---|
32 | </body>
|
---|
33 | </html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.