URL Filtering on Reverse Relationship

135 views
Skip to first unread message

dookehster

unread,
Jun 22, 2011, 4:55:17 PM6/22/11
to Tastypie
Hi, I've asked for help on IRC and was told to follow up on a post on
this mailing list. Basically, I was unable to get filtering on a URL
for a reverse relationship.

Resources:
http://dpaste.com/557590/

Models:
http://dpaste.com/557591/

Stack Trace on http://dookvm:8080/api/v1/appointment/?format=json&patients=3:
http://dpaste.com/557593/

Cheers!

-Brandon

Daniel Lindsley

unread,
Jun 26, 2011, 3:21:13 AM6/26/11
to django-...@googlegroups.com
dookehster,


Sorry, but I can't reproduce this one. I put together the smallest
possible test case I could make to try to replicate this
(https://github.com/toastdriven/filtering - follow the
``README.rst``). When I run that setup, M2M filtering works for me.
I'd recommend you poke at it then compare with your code to see where
there are differences.


Daniel

dookehster

unread,
Jun 27, 2011, 1:04:25 AM6/27/11
to Tastypie
Hmm, seems to work perfectly fine if I specify relate_name (but won't
work no matter what I do with just <name>_set) in M2M field as you
have.

Is this a requirement?

On Jun 26, 3:21 am, Daniel Lindsley <polarc...@gmail.com> wrote:
> dookehster,
>
>    Sorry, but I can't reproduce this one. I put together the smallest
> possible test case I could make to try to replicate this
> (https://github.com/toastdriven/filtering- follow the
> ``README.rst``). When I run that setup, M2M filtering works for me.
> I'd recommend you poke at it then compare with your code to see where
> there are differences.
>
> Daniel
>
>
>
>
>
>
>
> On Wed, Jun 22, 2011 at 3:55 PM, dookehster <dookehs...@gmail.com> wrote:
> > Hi, I've asked for help on IRC and was told to follow up on a post on
> > this mailing list. Basically, I was unable to get filtering on a URL
> > for a reverse relationship.
>
> > Resources:
> >http://dpaste.com/557590/
>
> > Models:
> >http://dpaste.com/557591/
>
> > Stack Trace onhttp://dookvm:8080/api/v1/appointment/?format=json&patients=3:
> >http://dpaste.com/557593/
>
> > Cheers!
>
> > -Brandon

Daniel Lindsley

unread,
Jul 18, 2011, 10:08:55 PM7/18/11
to django-...@googlegroups.com
dookehster,


It shouldn't be a requirement, no. Not sure why it's not working in
your case.


Daniel

Reply all
Reply to author
Forward
0 new messages