I think I will first attempt to allow order_by to accept related
objects, like order_by('user__last_name'). Could someone please point
me in the right direction? I am not too familiar with django's db
code. What all would need changing?
--~--~-~--~~~---~--~~
Yo
Gary Wilson wrote:
> Please look at my original post, I am not trying to use a
> get_last_name() method.
Yes, sorry, I realised this just after I wrote that e-mail and wrote a
better reply.
Luke
--~--~-~--~~~---~--~~
You received this message because you are su
Luke Plant wrote:
> In that particular case, yes (and in this instance it might be possible
> to implement what you want be writing a custom manager and overriding
> get_query_set() so that it adds a join and custom ordering), but there
> is no (feasible) way of introspecting get_last_name() and w
On Thursday 13 July 2006 22:07, Luke Plant wrote:
> In that particular case, yes (and in this instance it might be
> possible to implement what you want be writing a custom manager and
> overriding get_query_set() so that it adds a join and custom
> ordering), but there is no (feasible) way of in
On Thursday 13 July 2006 20:26, Gary Wilson wrote:
> Luke Plant wrote:
> > On Wednesday 12 July 2006 21:27, Gary Wilson wrote:
> > > Jay Parlar wrote:
> > > > You can use functions inside list_display:
> > > >
> > > > class Admin:
> > > > list_display = ('get_last_name',)
> > > >
> >
Luke Plant wrote:
> On Wednesday 12 July 2006 21:27, Gary Wilson wrote:
> > Jay Parlar wrote:
> > > You can use functions inside list_display:
> > >
> > > class Admin:
> > > list_display = ('get_last_name',)
> > >
> > > def get_last_name(self):
> > > return self.user.last_n
On Wednesday 12 July 2006 21:27, Gary Wilson wrote:
> Jay Parlar wrote:
> > You can use functions inside list_display:
> >
> > class Admin:
> > list_display = ('get_last_name',)
> >
> > def get_last_name(self):
> > return self.user.last_name
> > get_last_name.short_desc
Jay Parlar wrote:
> You can use functions inside list_display:
>
> class Admin:
> list_display = ('get_last_name',)
>
> def get_last_name(self):
> return self.user.last_name
> get_last_name.short_description = "Last Name"
But you can't sort or seach it.
--~--~---
On 7/12/06, Gary Wilson <[EMAIL PROTECTED]> wrote:
>
> So I've got a model resembling:
>
> ==
> from django.contrib.auth.models import User
>
> class ExtendedUser(models.Model):
> user = models.OneToOneField(User)
>
> class Admin:
> list_display = ('user',)
> search
So I've got a model resembling:
==
from django.contrib.auth.models import User
class ExtendedUser(models.Model):
user = models.OneToOneField(User)
class Admin:
list_display = ('user',)
search_fields = ('user',)
==
The admin has a user column but it is so
10 matches
Mail list logo