On Sat, Mar 12, 2011 at 1:27 PM, Shawn Milochik wrote:
> You can put a sort order in the model's meta info. That way you'll always
> have a default sort.
>
If you do this, every query you execute returning that model will be
sorted. This can lead to serious performance issues
Yeash. Don't know how I missed that. Thanks!
On Sat, Mar 12, 2011 at 5:27 AM, Shawn Milochik wrote:
> You can put a sort order in the model's meta info. That way you'll always
> have a default sort.
>
> --
> You received this message because you are subscribed to the Google
You can put a sort order in the model's meta info. That way you'll always
have a default sort.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group,
If I have a Product model which has a one-to-many relationship with
ProductImage model...
I can get the images in the template using product.productimage_set.all,
however, is there any way to sort that or will I instead have to query the
product images in the view?
--
*Green Tackle* -
4 matches
Mail list logo