parent_prefix and lookup
Is there any documentation on what parent_prefix and lookup and mean/ what they should be set to on a NestedSimpleRouter?
Hi, the DRF documentation contains information about prefix and lookup:
http://www.django-rest-framework.org/api-guide/routers#custom-routers
HTH, Jesaja
What about parent_prefix? I do not see that term mentioned on the page.
parent_prefix exists only in drf-nested-routers, it's the prefix that was
passed to the parent_router.
On Jun 26, 2014 4:39 PM, "Alex Rothberg" [email protected] wrote:
What about parent_prefix? I do not see that term mentioned on the page.
— Reply to this email directly or view it on GitHub https://github.com/alanjds/drf-nested-routers/issues/21#issuecomment-47233912 .
On my wishlist is this parent_prefix to be grabbed automatically from the parent router, but time has been short even for docs. Sorry for that.
Once I nest my routers and get: http://host/api/parents/parentID/children/
Can I still do ordering, search, filter on children? http://host/api/parents/parentID/children?search=someSearch
Is there special configuration I have to setup?
yes, with the apropriate configurations on the viewset/serializer
do you have a sample appropriate config that I can see? How does this differ from doing un nested for the viewset/serializer
No difference - the only config is what you would usually do for a search filter to work