On Tue, Mar 22, 2011 at 5:29 PM, Jason Culverhouse <[email protected]>wrote:
> On Mar 22, 2011, at 12:10 PM, Bobby Roberts wrote: > > > how else would you pull in information from another model into the > > current model list view in admin? > > > > > There are some options: > Search for > http://www.google.com/search?q=ModelAdmin+__ > > You'll find http://code.djangoproject.com/ticket/10743 > "Support lookup separators in ModelAdmin.list_display" > > If this "bug" were fixed, your problem would be solved.... > There is no need for any Django change to get this to work today. All that needs to be done is for the existing callables specified in list_display to specify the appropriate admin_order_field value, e.g.: def Client_Lastname(self, obj): return obj.CustomerId.lastName Client_Lastname.admin_order_field = 'CustomerId__lastName' Doc on admin_order_field is here: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display, search for admin_order_field. Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

