I'm not familiar with Mongo and Tastypie, but is parsing querystrings in
the <attribute>__<subattribute> format something that it's supposed to do
by default?


On Fri, Jun 28, 2013 at 11:20 AM, Hélio Miranda <[email protected]> wrote:

> Hi!
> I have my application django-tastypie as BD and MongoDB
> But I have a problem, it is unable to filter on more than one level, I
> will give an example to explain better.
> I have the following:
> *class EntrepreneurResource (resources.MongoEngineResource):*
> *    *
> *     country = fields.ReferencedListField (of =
> 'Football.Resource.CountryResource'*
> *          attribute = 'country', full = True, null = True)*
> *    *
> *     class Meta:*
> *         queryset = Entrepreneur.objects.all ()*
> *         allowed_methods = ('get', 'post', 'put', 'delete', 'patch')*
> *         list_allowed_methods = ['get', 'post', 'put', 'delete', 'patch']
> *
> *         authorization = Authorization ()*
> *         filtering = {*
> *             'id': ALL,*
> *             'name': ALL,*
> *             'country': ALL_WITH_RELATIONS,*
> *             }*
>
> When I want to make a filter in the Entrepreneur country do the following:
> *
> http://localhost:8080/onpitch/api/v1/Entrepreneur/?country=51cd93e18774a713bc1f5763
> *
>
> And he returns the entrepreneur to have the country with that id
>
> But now if I as you want, eg a filter like this:
> *http://localhost:8080/onpitch/api/v1/Entrepreneur/?country__name=Portugal
> *
>
> I do not return anything []
>
> Someone can help me? What am I doing wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to