Re: Manager is not accessible via model instances

2009-09-18 Thread Oleg Oltar
the code I use is active_list = UserProfile.objects\ .get_active_members()\ .exclude(user = current_user) On Fri, Sep 18, 2009 at 7:28 PM, Daniel Roseman wrote: > > On Sep 18, 4:34 pm, Oleg Oltar ltarase...@gmail.com> > wrote: > > Hi! > > > > I have following model: > > > >

Re: Manager is not accessible via model instances

2009-09-18 Thread Daniel Roseman
On Sep 18, 4:34 pm, Oleg Oltar wrote: > Hi! > > I have following model: > > class UserProfile(models.Model): >     """ >     User profile model, cintains a Foreign Key, which links it to the >     user profile. >     """ >     about = models.TextField(blank=True) >     user = models.ForeignKey(Us

Re: Manager is not accessible via model instances

2009-09-18 Thread Tiago Serafim
Try this: def get_active_members(self): return return self.get_query_set().filter(is_active=True) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Manager is not accessible via model instances

2009-09-18 Thread Oleg Oltar
Hi! I have following model: class UserProfile(models.Model): """ User profile model, cintains a Foreign Key, which links it to the user profile. """ about = models.TextField(blank=True) user = models.ForeignKey(User, unique=True) ranking = models.IntegerField(default