Chandan Rajpurohit

An Artist With Technical Skills

Order by Ascending order

Ascending.objects.all().filter(product_id=product_id).order_by('created_date')

Order by Descending order

Descending.objects.all().filter(product_id=product_id).order_by('-created_date')

- (hyphen) in django is used to indicate descending order.

Thank you for reading this article, I really appreciate it. If you have any question feel free to leave a comment. 

%d bloggers like this: