source: templates/most_popular_artist_per_customer_per_genre.html@ 59b2e9c

Last change on this file since 59b2e9c was 59b2e9c, checked in by ManuelTrajcev <manueltrajcev7@…>, 2 weeks ago

querry mostr popular artist per customer for each genre

  • Property mode set to 100644
File size: 2.5 KB
Line 
1<!DOCTYPE html>
2<html>
3<head>
4 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet"
5 integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
6 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js"
7 integrity="sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq"
8 crossorigin="anonymous"></script>
9 <title>Most Listened Artist of each Genre per Customer</title>
10</head>
11<body class="d-flex bg-light">
12{% include 'sidebar.html' %}
13<div class="container mt-5">
14 <h1 class="text-center mb-4">Most Listened Artist of each Genre per Customer</h1>
15
16 <form method="GET" action="" class="row g-3 mb-4">
17 <div class="col-md-4">
18 <label for="customer_id" class="form-label">Select Customer:</label>
19 <select name="customer_id" id="customer_id" class="form-select">
20 <option value="">All Customers</option>
21 {% for customer in customers %}
22 <option value="{{ customer.customer_id }}"
23 {% if request.GET.customer_id == customer.0|stringformat:'s' %}selected{% endif %}>
24 {{ customer.first_name }} {{ customer.last_name }}
25 </option>
26 {% endfor %}
27 </select>
28 </div>
29
30 <div class="col-md-4 d-flex align-items-end">
31 <button type="submit" class="btn btn-primary w-100">Filter</button>
32 </div>
33 </form>
34 {% if customer %}
35 <div class="row display-5">
36 <div class="col-3 bg-light-subtle m-1 pb-3 border border-secondary-subtle rounded-3">
37 {{ customer }}
38 </div>
39 </div>
40 {% endif %}
41
42 <div class="list-group">
43 <div class="row">
44 <div class="col-4 font-weight-bold"><strong>Genre</strong></div>
45 <div class="col-4 font-weight-bold"><strong>Artist</strong></div>
46 </div>
47 {% for row in data %}
48 <a href="#" class="list-group-item list-group-item-action">
49 <div class="row">
50 <div class="col-4 font-weight-bold">{{ row.genre }}</div>
51 <div class="col-4 font-weight-bold">{{ row.arist }}</div>
52 </div>
53 </a>
54 {% empty %}
55 <div class="alert alert-warning" role="alert">
56 Select a customer.
57 </div>
58 {% endfor %}
59 </div>
60</div>
61</body>
62</html>
Note: See TracBrowser for help on using the repository browser.