Skip to content
All lessons

Tech Insights

On Django, be careful when paginating querysets. Make sure your order_by always return consistent ordering, otherwise you mig...

On Django, be careful when paginating querysets. Make sure your order_by always return consistent ordering, otherwise you might have subtle bugs in page transitions. For example, .order_by('title') isn't enough if items may have repeated titles. Do a .order_by('title', 'created') or a .order_by('title', 'id') instead to guarantee the order won't vary on different queries.

Shared by

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us