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

Unfortunately you have to add this to the URL manually - there's no
way of getting the filter box to show this as an option, as far as I
know. One possibility would be to define a custom template for the
Equipamento changelist page which includes a hard-coded link to this
URL.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to