sandwitches 2.5.1__py3-none-any.whl → 2.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sandwitches/templates/admin/admin_base.html +2 -12
- sandwitches/templates/admin/dashboard.html +32 -222
- sandwitches/templates/admin/recipe_list.html +24 -25
- sandwitches/templates/admin/tag_list.html +5 -9
- sandwitches/templates/admin/user_list.html +22 -22
- sandwitches/views.py +0 -1
- {sandwitches-2.5.1.dist-info → sandwitches-2.5.2.dist-info}/METADATA +2 -1
- {sandwitches-2.5.1.dist-info → sandwitches-2.5.2.dist-info}/RECORD +9 -9
- {sandwitches-2.5.1.dist-info → sandwitches-2.5.2.dist-info}/WHEEL +2 -2
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</button>
|
|
28
28
|
<a href="{% url 'admin_dashboard' %}" class="row align-center">
|
|
29
29
|
<img src="{% static 'icons/icon.svg' %}" class="circle small">
|
|
30
|
-
<h6 class="max">{%
|
|
30
|
+
<h6 class="max">{% trans "Sandwitches Admin" %} | {% block admin_title %}{% endblock %}</h6>
|
|
31
31
|
</a>
|
|
32
32
|
<div class="max"></div>
|
|
33
33
|
|
|
@@ -104,17 +104,7 @@
|
|
|
104
104
|
{% endblock %}
|
|
105
105
|
|
|
106
106
|
{% block footer %}
|
|
107
|
-
|
|
108
|
-
<div class="row align-center">
|
|
109
|
-
<div class="max">
|
|
110
|
-
<h6 class="small">Sandwitches Admin</h6>
|
|
111
|
-
<div class="small-text">© {% now "Y" %} Sandwitches Inc.</div>
|
|
112
|
-
</div>
|
|
113
|
-
<nav>
|
|
114
|
-
version {{ version }}
|
|
115
|
-
</nav>
|
|
116
|
-
</div>
|
|
117
|
-
</footer>
|
|
107
|
+
{% include "components/footer.html" %}
|
|
118
108
|
{% endblock %}
|
|
119
109
|
|
|
120
110
|
{% block extra_scripts %}
|
|
@@ -13,313 +13,123 @@
|
|
|
13
13
|
{% block content %}
|
|
14
14
|
|
|
15
15
|
<div class="row align-center mb-2">
|
|
16
|
-
|
|
17
16
|
<div class="max"></div>
|
|
18
|
-
|
|
19
17
|
<form method="get" class="row no-space border round padding surface-variant">
|
|
20
|
-
|
|
21
18
|
<div class="field label small transparent">
|
|
22
|
-
|
|
23
19
|
<input type="date" name="start_date" value="{{ start_date }}">
|
|
24
|
-
|
|
25
20
|
<label>{% trans "Start Date" %}</label>
|
|
26
|
-
|
|
27
21
|
</div>
|
|
28
|
-
|
|
29
22
|
<div class="divider vertical"></div>
|
|
30
|
-
|
|
31
23
|
<div class="field label small transparent">
|
|
32
|
-
|
|
33
24
|
<input type="date" name="end_date" value="{{ end_date }}">
|
|
34
|
-
|
|
35
25
|
<label>{% trans "End Date" %}</label>
|
|
36
|
-
|
|
37
26
|
</div>
|
|
38
|
-
|
|
39
27
|
<button type="submit" class="button primary square"><i>refresh</i></button>
|
|
40
|
-
|
|
41
28
|
</form>
|
|
42
|
-
|
|
43
29
|
</div>
|
|
44
30
|
|
|
45
31
|
|
|
46
32
|
|
|
47
33
|
<div class="grid">
|
|
48
|
-
|
|
49
34
|
<div class="s12 m4">
|
|
50
|
-
|
|
51
35
|
<article class="round primary-container padding">
|
|
52
|
-
|
|
53
36
|
<div class="row align-center">
|
|
54
|
-
|
|
55
37
|
<i class="extra">restaurant</i>
|
|
56
|
-
|
|
57
38
|
<div class="max">
|
|
58
|
-
|
|
59
39
|
<h4 class="bold">{{ recipe_count }}</h4>
|
|
60
|
-
|
|
61
40
|
<div>{% trans "Recipes" %}</div>
|
|
62
|
-
|
|
63
41
|
</div>
|
|
64
|
-
|
|
65
42
|
</div>
|
|
66
|
-
|
|
67
43
|
<nav class="right-align">
|
|
68
|
-
|
|
69
44
|
<a href="{% url 'admin_recipe_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
70
|
-
|
|
71
45
|
</nav>
|
|
72
|
-
|
|
73
46
|
</article>
|
|
74
|
-
|
|
75
47
|
</div>
|
|
76
48
|
|
|
77
49
|
<div class="s12 m4">
|
|
78
|
-
|
|
79
50
|
<article class="round secondary-container padding">
|
|
80
|
-
|
|
81
51
|
<div class="row align-center">
|
|
82
|
-
|
|
83
52
|
<i class="extra">people</i>
|
|
84
|
-
|
|
85
53
|
<div class="max">
|
|
86
|
-
|
|
87
54
|
<h4 class="bold">{{ user_count }}</h4>
|
|
88
|
-
|
|
89
55
|
<div>{% trans "Users" %}</div>
|
|
90
|
-
|
|
91
56
|
</div>
|
|
92
|
-
|
|
93
57
|
</div>
|
|
94
|
-
|
|
95
58
|
<nav class="right-align">
|
|
96
|
-
|
|
97
59
|
<a href="{% url 'admin_user_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
98
|
-
|
|
99
60
|
</nav>
|
|
100
|
-
|
|
101
61
|
</article>
|
|
102
|
-
|
|
103
62
|
</div>
|
|
104
63
|
|
|
105
64
|
<div class="s12 m4">
|
|
106
|
-
|
|
107
65
|
<article class="round tertiary-container padding">
|
|
108
|
-
|
|
109
66
|
<div class="row align-center">
|
|
110
|
-
|
|
111
67
|
<i class="extra">label</i>
|
|
112
|
-
|
|
113
68
|
<div class="max">
|
|
114
|
-
|
|
115
69
|
<h4 class="bold">{{ tag_count }}</h4>
|
|
116
|
-
|
|
117
70
|
<div>{% trans "Tags" %}</div>
|
|
118
|
-
|
|
119
71
|
</div>
|
|
120
|
-
|
|
121
72
|
</div>
|
|
122
|
-
|
|
123
73
|
<nav class="right-align">
|
|
124
|
-
|
|
125
74
|
<a href="{% url 'admin_tag_list' %}" class="button transparent">{% trans "View all" %}</a>
|
|
126
|
-
|
|
127
75
|
</nav>
|
|
128
|
-
|
|
129
76
|
</article>
|
|
130
|
-
|
|
77
|
+
</div>
|
|
78
|
+
<div class="s12">
|
|
79
|
+
{% include "admin/partials/dashboard_charts.html" %}
|
|
131
80
|
</div>
|
|
132
81
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<!-- Charts Section -->
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<div class="s12">
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
{% include "admin/partials/dashboard_charts.html" %}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
{% if pending_recipes %}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<div class="s12">
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<h5 class="bold error-text">{% trans "Pending Approvals" %}</h5>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<table class="border striped no-space">
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<thead>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<tr>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<th>{% trans "Title" %}</th>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<th>{% trans "Uploader" %}</th>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<th>{% trans "Created At" %}</th>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<th class="right-align">{% trans "Actions" %}</th>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</tr>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
</thead>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<tbody>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{% for recipe in pending_recipes %}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<td>{{ recipe.title }}</td>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<td class="right-align">
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<a href="{% url 'admin_recipe_approve' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Approve' %}"><i>check</i></a>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
</td>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</tr>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
{% endfor %}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</tbody>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
</table>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
</div>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
{% endif %}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
<div class="s12">
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<h5 class="bold">{% trans "Recent Recipes" %}</h5>
|
|
276
|
-
|
|
82
|
+
<div class="s12">
|
|
83
|
+
<h5 class="bold error-text">{% trans "Pending Approvals" %}</h5>
|
|
277
84
|
<table class="border striped no-space">
|
|
278
|
-
|
|
279
85
|
<thead>
|
|
280
|
-
|
|
281
86
|
<tr>
|
|
282
|
-
|
|
283
87
|
<th>{% trans "Title" %}</th>
|
|
284
|
-
|
|
285
88
|
<th>{% trans "Uploader" %}</th>
|
|
286
|
-
|
|
287
89
|
<th>{% trans "Created At" %}</th>
|
|
288
|
-
|
|
289
90
|
<th class="right-align">{% trans "Actions" %}</th>
|
|
290
|
-
|
|
291
91
|
</tr>
|
|
292
|
-
|
|
293
92
|
</thead>
|
|
294
|
-
|
|
295
93
|
<tbody>
|
|
296
|
-
|
|
297
|
-
{% for recipe in recent_recipes %}
|
|
298
|
-
|
|
94
|
+
{% for recipe in pending_recipes %}
|
|
299
95
|
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
300
|
-
|
|
301
96
|
<td>{{ recipe.title }}</td>
|
|
302
|
-
|
|
303
97
|
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
304
|
-
|
|
305
98
|
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
306
|
-
|
|
307
99
|
<td class="right-align">
|
|
308
|
-
|
|
100
|
+
<a href="{% url 'admin_recipe_approve' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Approve' %}"><i>check</i></a>
|
|
101
|
+
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
{% endfor %}
|
|
105
|
+
</tbody>
|
|
106
|
+
</table>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="s12">
|
|
109
|
+
<h5 class="bold">{% trans "Recent Recipes" %}</h5>
|
|
110
|
+
<table class="border striped scroll surface">
|
|
111
|
+
<thead>
|
|
112
|
+
<tr>
|
|
113
|
+
<th>{% trans "Title" %}</th>
|
|
114
|
+
<th>{% trans "Uploader" %}</th>
|
|
115
|
+
<th>{% trans "Created At" %}</th>
|
|
116
|
+
<th >{% trans "Actions" %}</th>
|
|
117
|
+
</tr>
|
|
118
|
+
</thead>
|
|
119
|
+
<tbody>
|
|
120
|
+
{% for recipe in recent_recipes %}
|
|
121
|
+
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
122
|
+
<td>{{ recipe.title }}</td>
|
|
123
|
+
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
124
|
+
<td>{{ recipe.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
|
|
125
|
+
<td>
|
|
309
126
|
<a href="{% url 'admin_recipe_edit' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();"><i>edit</i></a>
|
|
310
|
-
|
|
311
127
|
</td>
|
|
312
|
-
|
|
313
128
|
</tr>
|
|
314
|
-
|
|
315
129
|
{% endfor %}
|
|
316
|
-
|
|
317
130
|
</tbody>
|
|
318
|
-
|
|
319
131
|
</table>
|
|
320
|
-
|
|
321
132
|
</div>
|
|
322
|
-
|
|
323
133
|
</div>
|
|
324
134
|
|
|
325
135
|
{% endblock %}
|
|
@@ -12,32 +12,34 @@
|
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<table class="border
|
|
15
|
+
<table class="border scroll surface large-space">
|
|
16
16
|
<thead>
|
|
17
17
|
<tr>
|
|
18
|
-
<th
|
|
19
|
-
<th
|
|
20
|
-
<th class="max">
|
|
18
|
+
<th>{% trans "Image" %}</th>
|
|
19
|
+
<th>
|
|
21
20
|
<a href="?sort={% if current_sort == 'title' %}-title{% else %}title{% endif %}" class="row align-center">
|
|
22
21
|
{% trans "Title" %}
|
|
23
22
|
{% if current_sort == 'title' %}<i>arrow_upward</i>{% elif current_sort == '-title' %}<i>arrow_downward</i>{% endif %}
|
|
24
23
|
</a>
|
|
25
24
|
</th>
|
|
26
|
-
<th
|
|
25
|
+
<th>
|
|
27
26
|
<a href="?sort={% if current_sort == 'price' %}-price{% else %}price{% endif %}" class="row align-center">
|
|
28
27
|
{% trans "Price" %}
|
|
29
28
|
{% if current_sort == 'price' %}<i>arrow_upward</i>{% elif current_sort == '-price' %}<i>arrow_downward</i>{% endif %}
|
|
30
29
|
</a>
|
|
31
30
|
</th>
|
|
32
|
-
<th
|
|
31
|
+
<th>
|
|
33
32
|
<a href="?sort={% if current_sort == 'orders' %}-orders{% else %}orders{% endif %}" class="row align-center">
|
|
34
33
|
{% trans "Orders" %}
|
|
34
|
+
<i class="primary-text">orders</i>
|
|
35
35
|
{% if current_sort == 'orders' %}<i>arrow_upward</i>{% elif current_sort == '-orders' %}<i>arrow_downward</i>{% endif %}
|
|
36
36
|
</a>
|
|
37
37
|
</th>
|
|
38
|
-
<th
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
<th>{% trans "Rating" %}
|
|
39
|
+
<i class="primary-text">star</i>
|
|
40
|
+
</th>
|
|
41
|
+
<th>{% trans "Approved" %}</th>
|
|
42
|
+
<th>{% trans "Tags" %}</th>
|
|
41
43
|
<th>
|
|
42
44
|
<a href="?sort={% if current_sort == 'uploader' %}-uploader{% else %}uploader{% endif %}" class="row align-center">
|
|
43
45
|
{% trans "Uploader" %}
|
|
@@ -50,61 +52,58 @@
|
|
|
50
52
|
{% if current_sort == 'created_at' %}<i>arrow_upward</i>{% elif current_sort == '-created_at' %}<i>arrow_downward</i>{% endif %}
|
|
51
53
|
</a>
|
|
52
54
|
</th>
|
|
53
|
-
<th
|
|
55
|
+
<th>{% trans "Actions" %}</th>
|
|
54
56
|
</tr>
|
|
55
57
|
</thead>
|
|
56
|
-
<tbody>
|
|
58
|
+
<tbody>
|
|
59
|
+
{% for recipe in recipes %}
|
|
57
60
|
<tr class="pointer" onclick="location.href='{% url 'admin_recipe_edit' recipe.pk %}'">
|
|
58
|
-
<td
|
|
59
|
-
<td class="min">
|
|
61
|
+
<td>
|
|
60
62
|
{% if recipe.image %}
|
|
61
63
|
<img src="{{ recipe.image_thumbnail.url }}" class="admin-thumb round">
|
|
62
64
|
{% else %}
|
|
63
65
|
<div class="admin-thumb round gray1 middle-align center-align">
|
|
64
|
-
<i class="extra">
|
|
66
|
+
<i class="extra">image</i>
|
|
65
67
|
</div>
|
|
66
68
|
{% endif %}
|
|
67
69
|
</td>
|
|
68
|
-
<td
|
|
70
|
+
<td>
|
|
69
71
|
{% if recipe.is_highlighted %}
|
|
70
72
|
<i class="tiny amber-text">star</i>
|
|
71
73
|
{% endif %}
|
|
72
74
|
<b>{{ recipe.title }}</b>
|
|
73
75
|
</td>
|
|
74
|
-
<td
|
|
76
|
+
<td>
|
|
75
77
|
{% if recipe.price %}
|
|
76
78
|
{{ recipe.price }} €
|
|
77
79
|
{% else %}
|
|
78
80
|
-
|
|
79
81
|
{% endif %}
|
|
80
82
|
</td>
|
|
81
|
-
<td
|
|
83
|
+
<td>
|
|
82
84
|
{{ recipe.daily_orders_count }} / {{ recipe.max_daily_orders|default:"∞" }}
|
|
83
85
|
</td>
|
|
84
|
-
<td class="
|
|
86
|
+
<td class="center-align">
|
|
85
87
|
<div class="row align-center">
|
|
86
88
|
<i class="primary-text">star</i>
|
|
87
89
|
<span>{{ recipe.avg_rating|default:0|floatformat:1 }}</span>
|
|
88
90
|
</div>
|
|
89
91
|
</td>
|
|
90
|
-
<td class="
|
|
92
|
+
<td class="center-align">
|
|
91
93
|
{% if recipe.is_approved %}
|
|
92
94
|
<i class="primary-text">check_circle</i>
|
|
93
95
|
{% else %}
|
|
94
|
-
<
|
|
95
|
-
<i>check</i>
|
|
96
|
-
<span>{% trans "Approve" %}</span>
|
|
97
|
-
</a>
|
|
96
|
+
<i class="primary-text">close</i>
|
|
98
97
|
{% endif %}
|
|
99
98
|
</td>
|
|
100
|
-
<td
|
|
99
|
+
<td>
|
|
101
100
|
{% for tag in recipe.tags.all %}
|
|
102
101
|
<span class="chip tiny">{{ tag.name }}</span>
|
|
103
102
|
{% endfor %}
|
|
104
103
|
</td>
|
|
105
104
|
<td>{{ recipe.uploaded_by.username|default:"-" }}</td>
|
|
106
105
|
<td>{{ recipe.created_at|date:"SHORT_DATE_FORMAT" }}</td>
|
|
107
|
-
<td
|
|
106
|
+
<td>
|
|
108
107
|
<a href="{% url 'admin_recipe_delete' recipe.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Delete' %}"><i>delete</i></a>
|
|
109
108
|
</td>
|
|
110
109
|
</tr>
|
|
@@ -12,22 +12,18 @@
|
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<table class="border striped
|
|
15
|
+
<table class="border striped large-space scroll surface">
|
|
16
16
|
<thead>
|
|
17
17
|
<tr>
|
|
18
|
-
<th
|
|
19
|
-
<th
|
|
20
|
-
<th>{% trans "Slug" %}</th>
|
|
21
|
-
<th class="right-align">{% trans "Actions" %}</th>
|
|
18
|
+
<th>{% trans "Name" %}</th>
|
|
19
|
+
<th>{% trans "Actions" %}</th>
|
|
22
20
|
</tr>
|
|
23
21
|
</thead>
|
|
24
22
|
<tbody>
|
|
25
23
|
{% for tag in tags %}
|
|
26
24
|
<tr class="pointer" onclick="location.href='{% url 'admin_tag_edit' tag.pk %}'">
|
|
27
|
-
<td
|
|
28
|
-
<td
|
|
29
|
-
<td>{{ tag.slug }}</td>
|
|
30
|
-
<td class="right-align">
|
|
25
|
+
<td><b>{{ tag.name }}</b></td>
|
|
26
|
+
<td>
|
|
31
27
|
<a href="{% url 'admin_tag_delete' tag.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Delete' %}"><i>delete</i></a>
|
|
32
28
|
</td>
|
|
33
29
|
</tr>
|
|
@@ -6,51 +6,51 @@
|
|
|
6
6
|
{% block content %}
|
|
7
7
|
<h5 class="bold mb-2">{% trans "User Management" %}</h5>
|
|
8
8
|
|
|
9
|
-
<table class="border striped
|
|
9
|
+
<table class="border striped scroll surface large-space">
|
|
10
10
|
<thead>
|
|
11
11
|
<tr>
|
|
12
|
-
<th
|
|
13
|
-
<th
|
|
12
|
+
<th>{% trans "Avatar" %}</th>
|
|
13
|
+
<th>{% trans "User" %}</th>
|
|
14
14
|
<th>{% trans "Email" %}</th>
|
|
15
|
-
<th
|
|
16
|
-
<th
|
|
17
|
-
<th
|
|
15
|
+
<th>{% trans "Staff" %}</th>
|
|
16
|
+
<th>{% trans "Active" %}</th>
|
|
17
|
+
<th>{% trans "Actions" %}</th>
|
|
18
18
|
</tr>
|
|
19
19
|
</thead>
|
|
20
20
|
<tbody>
|
|
21
|
-
{% for
|
|
22
|
-
<tr class="pointer" onclick="location.href='{% url 'admin_user_edit'
|
|
23
|
-
<td
|
|
24
|
-
{% if
|
|
25
|
-
<img src="{{
|
|
21
|
+
{% for user in users %}
|
|
22
|
+
<tr class="pointer" onclick="location.href='{% url 'admin_user_edit' user.pk %}'">
|
|
23
|
+
<td>
|
|
24
|
+
{% if user.avatar %}
|
|
25
|
+
<img src="{{ user.avatar.url }}" class="admin-thumb round">
|
|
26
26
|
{% else %}
|
|
27
27
|
<div class="admin-thumb round gray1 middle-align center-align">
|
|
28
28
|
<i class="extra">person</i>
|
|
29
29
|
</div>
|
|
30
30
|
{% endif %}
|
|
31
31
|
</td>
|
|
32
|
-
<td
|
|
33
|
-
<b>{{
|
|
34
|
-
<div class="small-text">{{
|
|
32
|
+
<td>
|
|
33
|
+
<b>{{ user.username }}</b>
|
|
34
|
+
<div class="small-text">{{ user.get_full_name }}</div>
|
|
35
35
|
</td>
|
|
36
|
-
<td>{{
|
|
37
|
-
<td
|
|
38
|
-
{% if
|
|
36
|
+
<td>{{ user.email }}</td>
|
|
37
|
+
<td>
|
|
38
|
+
{% if user.is_staff %}
|
|
39
39
|
<i class="primary-text">check_circle</i>
|
|
40
40
|
{% else %}
|
|
41
41
|
<i class="grey-text">cancel</i>
|
|
42
42
|
{% endif %}
|
|
43
43
|
</td>
|
|
44
|
-
<td
|
|
45
|
-
{% if
|
|
44
|
+
<td>
|
|
45
|
+
{% if user.is_active %}
|
|
46
46
|
<i class="primary-text">check_circle</i>
|
|
47
47
|
{% else %}
|
|
48
48
|
<i class="grey-text">cancel</i>
|
|
49
49
|
{% endif %}
|
|
50
50
|
</td>
|
|
51
|
-
<td
|
|
52
|
-
{% if
|
|
53
|
-
<a href="{% url 'admin_user_delete'
|
|
51
|
+
<td>
|
|
52
|
+
{% if user != request.user %}
|
|
53
|
+
<a href="{% url 'admin_user_delete' user.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Delete' %}"><i>delete</i></a>
|
|
54
54
|
{% endif %}
|
|
55
55
|
</td>
|
|
56
56
|
</tr>
|
sandwitches/views.py
CHANGED
|
@@ -908,7 +908,6 @@ def user_settings(request):
|
|
|
908
908
|
user = form.save()
|
|
909
909
|
# Update language in session and cookie
|
|
910
910
|
translation.activate(user.language)
|
|
911
|
-
request.session[translation.LANGUAGE_SESSION_KEY] = user.language # ty:ignore[unresolved-attribute]
|
|
912
911
|
messages.success(request, _("Settings updated successfully."))
|
|
913
912
|
response = redirect("user_settings")
|
|
914
913
|
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, user.language)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sandwitches
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Author: Martyn van Dijke
|
|
6
6
|
Author-email: Martyn van Dijke <martijnvdijke600@gmail.com>
|
|
@@ -18,6 +18,7 @@ Requires-Dist: markdown>=3.10
|
|
|
18
18
|
Requires-Dist: pillow>=12.0.0
|
|
19
19
|
Requires-Dist: uvicorn>=0.40.0
|
|
20
20
|
Requires-Dist: whitenoise[brotli]>=6.11.0
|
|
21
|
+
Requires-Dist: requests>=2.32.5
|
|
21
22
|
Requires-Python: >=3.12
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
|
|
@@ -31,22 +31,22 @@ sandwitches/models.py,sha256=L8qMFoJ7WpIito2nTgsAB8s-UPUQMwDux63aKbP71aE,12468
|
|
|
31
31
|
sandwitches/settings.py,sha256=5_eQAJCAV093hnhr3XOxHekT4IF-PEJcRiTecq71_SQ,5841
|
|
32
32
|
sandwitches/storage.py,sha256=ibBG6tVtArqzgEKsRimZPwsqW7i9j4WiPLLHrOJchow,3578
|
|
33
33
|
sandwitches/tasks.py,sha256=cGPgEqxGOCwliIq0oxNZBGjnCtvrTdJN-XyIp1ciJ3k,6865
|
|
34
|
-
sandwitches/templates/admin/admin_base.html,sha256=
|
|
34
|
+
sandwitches/templates/admin/admin_base.html,sha256=MGd_i3YCgczGkTFUof2XlxUnAQJ6XP7YMcghdIeG2zQ,4135
|
|
35
35
|
sandwitches/templates/admin/confirm_delete.html,sha256=HfsZI_gV8JQTKz215TYgPWBrgrFhGv1UB3N-0Hln-14,804
|
|
36
|
-
sandwitches/templates/admin/dashboard.html,sha256=
|
|
36
|
+
sandwitches/templates/admin/dashboard.html,sha256=ExLPzEmg7h0SvCuXr0uG1INDPLyirIBfD3Yvw4A1zjQ,5355
|
|
37
37
|
sandwitches/templates/admin/order_list.html,sha256=eHFUn2speXaaj5_SFUG0Z0HfWVUR9-VCDRBeb8ufFb0,819
|
|
38
38
|
sandwitches/templates/admin/partials/dashboard_charts.html,sha256=NYrt-LDZO4__2KDWhAYL5K_f-2Zgj0iiuaZQiRZlBWg,3639
|
|
39
39
|
sandwitches/templates/admin/partials/order_rows.html,sha256=C7_ArHw1udaGjx6CRJHhksje0OReP7UUhdsHcdFPqCc,940
|
|
40
40
|
sandwitches/templates/admin/rating_list.html,sha256=8CHAsBfKfs4izhb-IyOiDjJXqAZxFcStoRSGh4pRlgM,1365
|
|
41
41
|
sandwitches/templates/admin/recipe_approval_list.html,sha256=M6GFYI45lAkLkvqP44cu5tDYVOeeVNklEphof1euesM,2281
|
|
42
42
|
sandwitches/templates/admin/recipe_form.html,sha256=wVKKBFl3vN11aknnmv2Hxkj66zZk9iZ0x_iS1j_X_Ro,12884
|
|
43
|
-
sandwitches/templates/admin/recipe_list.html,sha256=
|
|
43
|
+
sandwitches/templates/admin/recipe_list.html,sha256=P2lNACOEzwOeXk6uoEtXhvUlHADV--OkFjvSMapnC40,4985
|
|
44
44
|
sandwitches/templates/admin/tag_form.html,sha256=JRWgAl4fz_Oy-Kuo1K6Mex_CXdsHMABzzyPazthr1Kg,989
|
|
45
|
-
sandwitches/templates/admin/tag_list.html,sha256=
|
|
45
|
+
sandwitches/templates/admin/tag_list.html,sha256=OCtoOg11O5BxSg1hoBDUp_nBJhtQ-XUZewTJjDl3L-4,1028
|
|
46
46
|
sandwitches/templates/admin/task_detail.html,sha256=dO5zHOG-yTY1ly3VPA3o3jjie0wmxw0gdddtSKpN-W8,3825
|
|
47
47
|
sandwitches/templates/admin/task_list.html,sha256=3YF7YQ3nbXnWjApKeA07Z7HkhdMuH4s6sLoN7gwg0eE,1535
|
|
48
48
|
sandwitches/templates/admin/user_form.html,sha256=7_6GShLROFeJJexL1XLFUXdW9_lYF87eT6cigB5bQo4,1314
|
|
49
|
-
sandwitches/templates/admin/user_list.html,sha256=
|
|
49
|
+
sandwitches/templates/admin/user_list.html,sha256=Mnxu9mwR-j6VchcU3ahbDuKhajX3gPoQaw_GirT0oW4,2056
|
|
50
50
|
sandwitches/templates/base.html,sha256=4IkEdeEksQ9o4Ad72osMgMVnzz14aJa8WKg9HE3F0MU,3655
|
|
51
51
|
sandwitches/templates/base_beer.html,sha256=7dWwGOUEdBz19X3Rilbam1xSNkQqXqvC6cYrDdQvYIE,2025
|
|
52
52
|
sandwitches/templates/cart.html,sha256=YqmrzOLLPAXSqeXeUTrt9AwTTWOitOLTaD_k3mYYVpM,4537
|
|
@@ -79,8 +79,8 @@ sandwitches/templatetags/custom_filters.py,sha256=0KDFlFz4b5LwlcURBAmzyYWKKea-Lw
|
|
|
79
79
|
sandwitches/templatetags/markdown_extras.py,sha256=0ibmRzxE3r85x4k7kK71R-9UT0CgeegYF7MHzj3juTI,344
|
|
80
80
|
sandwitches/urls.py,sha256=0p7MpYranWc4qNPyInxNzg8J3vNhap_gdt2n892exJM,5006
|
|
81
81
|
sandwitches/utils.py,sha256=SJP-TkeRZ0OIfaMigYrOSbxRqYXswoqoWhwll3nFuAM,7245
|
|
82
|
-
sandwitches/views.py,sha256=
|
|
82
|
+
sandwitches/views.py,sha256=usKEOSnYUF-aQ5LYsXFa_J2APYgHO_h0jvu7cUorOt0,32965
|
|
83
83
|
sandwitches/wsgi.py,sha256=Eyncpnahq_4s3Lr9ruB-R3Lu9j9zBXqgPbUj7qhIbwU,399
|
|
84
|
-
sandwitches-2.5.
|
|
85
|
-
sandwitches-2.5.
|
|
86
|
-
sandwitches-2.5.
|
|
84
|
+
sandwitches-2.5.2.dist-info/WHEEL,sha256=e_m4S054HL0hyR3CpOk-b7Q7fDX6BuFkgL5OjAExXas,80
|
|
85
|
+
sandwitches-2.5.2.dist-info/METADATA,sha256=__auuJ3Gqh58507_QvFufqdeAv-B24p_cAMkPmF94MA,3143
|
|
86
|
+
sandwitches-2.5.2.dist-info/RECORD,,
|