Skip to content
Snippets Groups Projects
Commit dc29aeee authored by Nico Vermaas's avatar Nico Vermaas
Browse files

added ordering on -priority,id for tasks REST API.

parent caaca89d
No related branches found
No related tags found
4 merge requests!74Acceptance,!73Master,!56Dev nico,!55Dev nico
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 1.0.0 (8 mar 2021 - 17:10) <p class="footer"> Version 1.0.0 (9 mar 2021 - 9:00)
</div> </div>
......
...@@ -340,7 +340,7 @@ class TaskListViewAPI(generics.ListCreateAPIView): ...@@ -340,7 +340,7 @@ class TaskListViewAPI(generics.ListCreateAPIView):
A pagination list of tasks, unsorted. A pagination list of tasks, unsorted.
""" """
model = Task model = Task
queryset = Task.objects.all() queryset = Task.objects.all().order_by('-priority','id')
#serializer_class = TaskSerializer #serializer_class = TaskSerializer
# using the Django Filter Backend - https://django-filter.readthedocs.io/en/latest/index.html # using the Django Filter Backend - https://django-filter.readthedocs.io/en/latest/index.html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment