Commit f2de5545 authored by valdi's avatar valdi

sort data

parent 22028fd3
......@@ -6,7 +6,8 @@
<div class="row">
<div class="col-md-3">
<a href="{% url 'masterdata:add' %}" class="btn btn-success">Add</a><div class="input-group rounded">
</div>
</div><BR>
<form action="{% url 'masterdata:search' %}" method="get">
<input type="search" name="p" class="form-control rounded" placeholder="Search" aria-label="Search" aria-describedby="search-addon" />
<span class="input-group-text border-0" id="search-addon">
......
......@@ -11,7 +11,7 @@ from django.views import generic
def index(request):
latest_product_list = Product.objects.all()
latest_product_list = Product.objects.all().order_by('category_id', 'product_text')
context = {
'latest_product_list': latest_product_list,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment