On Fri, May 15, 2009 at 11:14 AM, Gabriel . <gabriel....@gmail.com> wrote:
> > Hi All, > > I have a manager which is used also as related manager: > > class ReleaseManager(models.Manager): > use_for_related_fields = True > > def all(self): > q = self.get_query_set() > q.query.add_q(Q(enabled=True) & Q(project__enabled=True)) > return q > > I need to add another filter to that query, but it depends on the > current logged user, is it possible? > > -- > Kind Regards > > > > There's no way to automatically get the currently logged in user there, you'll need to pass it in from the view. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---