Closed dustinfarris closed 10 years ago
Actually, this may only apply to my use of DRF.
e.g.:
router.register('school-teachers', viewsets.SchoolTeacherViewSet)
which means this PR is opinionated and probably shouldn't be merged unless using dashes is preferred by the majority.
I'll leave this open for a while for any +1's .. and will close without merging if I don't get any feedback.
So I think the easiest way to do this is to extend the adapter. Example (using ember-cli addon): https://github.com/dustinfarris/ember-django-adapter/wiki/Cookbook#use-dashes-in-url-prefixes
DRF uses dashes in root URLs, not underscores, e.g.
/api/school-teachers/
This PR doesn't affect the rest of the URL in which DRF does use underscores, e.g.
/api/children/4/school_teachers/