About 1,091,178 results (4,882 milliseconds)

ordering of nested serializer output

https://groups.google.com/g/django-rest-framework/c/L9aXnwS4AQw
May 28, 2014 ... I believe in newer versions of Django you can specify a custom queryset for a prefetch_related. That might be one way to go. Another option ...

Order_by on queryset from chained filters not working

https://groups.google.com/g/django-users/c/KVwz-1sGyis/m/gzqDF0BMbnAJ
Apr 24, 2014 ... This works, in that the select query django builds is correct, having the correct order by clause at the end. Next, to prepare the cases for ...

changing the default sort order for query sets

https://groups.google.com/g/wagtail/c/6vZExngYVu4
I'm sure the hint in the error message used to say something more meaningful than that - perhaps that's something that changed between Django versions. Will ...

Datetime Sorting issue with Query Function - Google Docs Editors ...

https://support.google.com/docs/thread/207206436/datetime-sorting-issue-with-query-function?hl=en
Mar 21, 2023 ... I'm pulling data from four separate tabs into one sheet with a simple query. I would like to sort this compiled data into an ordered list ...

Support Negative Indexing on QuerySets

https://groups.google.com/g/django-developers/c/x86iWFnZiik/m/wyeI5woWkVYJ
Jul 30, 2013 ... Django would reverse the sense of the query's ordering clause and use a simple LIMIT. If there isn't an ordering clause in the query, then I ...

How to sort the hierarchy with tree_id desc?

https://groups.google.com/g/django-mptt-dev/c/neXhuT2vDDY
Jan 5, 2012 ... ... django-mptt/templates.html#examples ). They won't reorder anything, so you can give them a differently ordered queryset if you want. 2. If ...

For QuerySet qs, list(qs)[k] does not always equal qs[k]

https://groups.google.com/g/django-developers/c/0l51azc8cBc
to a lack of ordering in the database. Lest you criticize accessing all queryset items by index, Django is currently doing just that in django.forms.models.

OrderingFilter in rest framework 2.4.3

https://groups.google.com/g/django-rest-framework/c/oZt2ben5aiY
Mar 5, 2015 ... The problem is: with the filter 'OrderingFilter', I cannot sort queryset by a column of a referenced model. See the following example: class ...

Is it possible to 'order' the left side of a filter_horizontal?

https://groups.google.com/g/django-users/c/-46GAa0FMlc
Nov 25, 2009 ... accomplishing that. The second way is to intercept the form's queryset powering the widget. If you're not using Form objects with your admin (ie ...

Inconsistent pagination when sorting by non-unique columns (ticket ...

https://groups.google.com/g/django-developers/c/fVZhDuiVfm8
Jan 11, 2023 ... order directive on the queryset, if all previous fields were not unique. I'm not sure, if this edge case can or should be handled by django

sorting different in postgres than in sqlite

https://groups.google.com/g/django-users/c/Tt96SpTGXBc
So, I sorted the queryset on the totals field, descending. Some participants didn ... > Here's my query, (I'm using the stable release version of django, > ...

filtering a QuerySet after a slice

https://groups.google.com/g/django-developers/c/oqgtvFE5y84
Dec 4, 2007 ... Django developers (Contributions to Django itself). Conversations ... UTPerson.objects.all().order_by('first_name').filter(...).order_by ...

Custom sort algorithm for a field in newforms-admin?

https://groups.google.com/g/django-users/c/NBkmwNr5CGI
Jul 31, 2008 ... change_list page, the ORDER BY in the db query is doing an alphabetical sort, but we need a numeric sort (like `sort -n` on a unix system) ...

Performance of ORDER BY vs. list.sort() vs. sorted()

https://groups.google.com/g/sqlalchemy/c/G1EnhodQ2gA
It seems to me that there are three ways of sorting such result lists: Use an ORDER BY in the query and let the database do the sorting. Use Python's list.sort ...

Haystack SearchForm Update Choices based on SQS

https://groups.google.com/g/django-haystack/c/dOgCD4rrB6E
Sep 28, 2016 ... As you can see by the code below, instead of getting the CHOICES via the SearchQuerySet, I'm using Django's QuerySet instead. Further down ...

Add an defer=True option for model fields

https://groups.google.com/g/django-developers/c/gTAtkNtlDRo
Feb 19, 2019 ... In ColdFusion, this was acceptable, because he was writing every query by hand, and could simply exclude that field. However, with the Django ...

postgres- can nulls be first when sorting in asc order?

https://groups.google.com/d/topic/django-users/Z9Rt-WtnPgU
Sep 26, 2011 ... to Django users. Found a similar post http://groups.google.com/group ... produced query. Cheers. Tom. j_syk's profile photo. j_syk. unread ...

Re: Suggestion: Aggregate/Grouping/Calculated methods in Django ...

https://groups.google.com/g/django-developers/c/5Tpi4cc4cbg
Dec 4, 2006 ... make a solution rather complicated. My idea was a queryset.groupby() could return some sort of dynamic. Django model class where the attributes ...

Public method for getting model field names in order of definition

https://groups.google.com/g/django-developers/c/RM2DRDjP2nc
Oct 21, 2009 ... Django developers (Contributions to Django itself). Conversations ... The values_list() query set method is useful for dumping data to CSV,

Stop QuerySet repr from executing queries

https://groups.google.com/g/django-developers/c/WzRZ0IfBipc
Have a Django model representing the above table, with a default sort of a non-indexed field; Have a local variable somewhere in the stack like `queryset = ...