Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
e56fc85d
Commit
e56fc85d
authored
Feb 08, 2017
by
Tom van Bussel
Browse files
Order pizzas on overview page by product name
parent
0fa9577a
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/pizzas/templates/pizzas/overview.html
View file @
e56fc85d
...
...
@@ -24,7 +24,7 @@
</tr>
</thead>
<tbody>
{% for product in product_list
.values
%}
{% for product in product_list %}
<tr>
<td>
{{ product.name }}
...
...
website/pizzas/views.py
View file @
e56fc85d
...
...
@@ -56,6 +56,8 @@ def overview(request, event_pk):
total_products
+=
1
total_money
+=
order
.
product
.
price
product_list
=
sorted
(
product_list
.
values
(),
key
=
lambda
x
:
x
[
'name'
])
context
=
{
'event'
:
event
,
'product_list'
:
product_list
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment