I know ModelAdmin accepts a list_select_related option, for in the admin
change list. I don't know if that applies in this situation though.

On Fri, Sep 12, 2008 at 8:10 PM, felix <[EMAIL PROTECTED]> wrote:

>
>
> now this will hit the database for each item in the select, to go
> fetch the language object to get the language name.
>
> so for extra credit, where do we add a select_related() for the
> widget ?
>
>
>
> On Sep 12, 7:43 pm, TiNo <[EMAIL PROTECTED]> wrote:
> > Probably more like:
> > def __unicode__(self):
> >     return u'%s | %s' % (self.title, self.language.name)
> >
> > because self.language is the language object, not the name (or title)
> > string.
> >
> > On Fri, Sep 12, 2008 at 7:32 PM, phred78 <[EMAIL PROTECTED]> wrote:
> >
> > > Oh, I see!
> > > You mean something like
> >
> > > def __unicode__(self):
> > >                return self.title + ' | ' + self.language
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to