5 ms·
What do you mean by nested routes? You can definitely have an API which looks like this: /api/people/morgante/comments/3000/
by morgante 10y ago
What do you mean by nested routes? You can definitely have an API which looks like this: /api/people/morgante/comments/3000/
- quinnftw 10y agoYou can also use the include(x.urls) feature to really simulate nested routes.
- sandGorgon 10y agohttp://www.django-rest-framework.org/api-guide/routers/#drf-nested-routers http://www.django-rest-framework.org/api-guide/routers/#drf-... See for yourself.
- morgante 10y agoI'm not sure why that would prevent you from migrating to DRF. It's clearly supported and there's even a helper module to nested routes even easier.
- sandGorgon 10y agoI'm not really sure why a framework would take a position where something is important (and probably requested enough) to put it in the official documentation.... but not make it part of the core. I fear we-barely-tolerate-it syndrome.
- morgante 10y agoIt's entirely possible to do in core without any extensions. It seems like you're just coming up with ridiculous excuses to not use DRF.
- sandGorgon 10y agoI'm willing to learn. I don't understand why you term it as "ridiculous", when the official documentation points to an external package. Is the documentation wrong ? If there's another way...why does it not get mention there? From my perspective, this is weird.
- morgante 10y agoFirst of all, why can't you use an external package? If all you want is URLs which look like "/api/people/morgante/comments/3000/" it's easy enough to construct those simply as standard viewsets. They're totally normal.