order admin list view

2006-10-03 Thread David S .

The docs say that, "regardless of how many fields are in ordering, the admin
site uses only the first field."  To overcome this, I overrode the default
manager to return a queryset ordered by the fields I want.  It works fine in
code (interactively), but not in the admin view.  Should it?  Is there a
workaround besides implementing the admin interface for this class myself?

Peace,
David S.


--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: order admin list view

2006-10-03 Thread Malcolm Tredinnick

On Tue, 2006-10-03 at 19:38 +, David S. wrote:
> The docs say that, "regardless of how many fields are in ordering, the admin
> site uses only the first field."  To overcome this, I overrode the default
> manager to return a queryset ordered by the fields I want.  It works fine in
> code (interactively), but not in the admin view.  Should it?  Is there a
> workaround besides implementing the admin interface for this class myself?

Difficult to answer a question like this without details. What did you
do when you "overrode the default manager"? Replaced the "objects"
attribute in your model?

I'm not sure I'm going to be able to answer the question in any case,
but some details would increase your chances.

Cheers,
Malcolm



--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: order admin list view

2006-10-04 Thread David S .

> some details 

So, I looked at the admin code and noticed that in the absence of any ordering
it orders by PK DESC.  I submitted a patch that would change the behavior to use
the ordering returned by a custom default manager.

http://code.djangoproject.com/ticket/2870

Peace,
David S.


--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---