Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Order by Django
#2
It seems like you're encountering an issue with sorting your Django model objects in descending order based on the receipe_view_count field. Your query Receipe.objects.all().order_by('-receipe_view_count') should indeed return the records in descending order based on the receipe_view_count field.
Reply


Messages In This Thread
Order by Django - by Sowmya - Mar-19-2024, 04:08 AM
RE: Order by Django - by Abhishikt - Apr-17-2024, 08:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Django: How to automatically substitute a variable in the admin page at Django 1.11? m0ntecr1st0 3 3,403 Jun-30-2019, 12:21 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020