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
>
> 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.

Hi.

First of all, thank you everybody for the answers. I really meant that
I wanted to do that through the admin's page filter system. I forgot
to mention that on the second message I sent.

I'm aware of the possibility to do this filtering through the django
shell, but i couldn't implement it to work at the admin page yet.
There's some interesting work being done about it (and filtering
customizations in general) here:

http://code.djangoproject.com/ticket/5833

But anyway, I didn't know about this neat feature of passing the shell
command to the url using '?modelo__manageable=True'. I guess it's
documented, but I didn't read the docs if the attention it requires.
Thanks for the info.

I guess that I'll try to hardcode it using the template system, while
the feature is still in development. (Hope it will make it's way into
trunk!)
--~--~---------~--~----~------------~-------~--~----~
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