On 5 jan, 01:38, Daniel Roseman <roseman.dan...@googlemail.com> wrote:
> On Jan 4, 11:24 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
> wrote:
>
>
>
> > On Sun, 2009-01-04 at 20:14 -0800, Daniel Roseman wrote:
>
> > [...]
>
> > > I don't know why you say filtering Equipamento based on the value in
> > > Model 'seems to be not possible'. On the contrary, it is perfectly
> > > possible - that's the whole point of a relational database system. You
> > > want something like:
> > > Equipamento.objects.filter(modelo__manageable=True)
>
> > > This is documented here:
> > >http://docs.djangoproject.com/en/dev/topics/db/queries/#lookups-that-...
>
> > The original message in this thread said "through the admin interface".
> > I'm not sure if when the original questioner reposted he changed his
> > use-case or omitted that key piece of information by accident, but the
> > difference is significant.
>
> > Malcolm
>
> Thanks for spotting that. In which case I should have added that I
> believe it is possible to use exactly the same syntax as a query
> parameter in the changelist
> page:http://mysite.com/admin/app/equipamento/?modelo__manageable=True
>
Also note that it only worked here with 0 or 1 as the values, not
False or True. Don't know if it is the right, default way, or it is
just database-related.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---