Closed kowsari closed 7 years ago
Hi I have /api/case which has a /api/case/:caseid/patient route now. I would like add /api/case/:caseid/meeting underneath case, but when I try to do the following I get an error.
router.register(r'case', case.CaseViewSet).\ register(r'patient', misc.PatientViewSet, base_name='case-patient', parents_query_lookups=['patient_cases']).\ register(r'meeting', meeting.MeetingViewSet, base_name='case-meeting', parents_query_lookups=['case_meetings'])
Is there anyway to do this with DRF extensions nested routers?
Thanks
I realized how to do this from the docs.
Hi I have /api/case which has a /api/case/:caseid/patient route now. I would like add /api/case/:caseid/meeting underneath case, but when I try to do the following I get an error.
router.register(r'case', case.CaseViewSet).\ register(r'patient', misc.PatientViewSet, base_name='case-patient', parents_query_lookups=['patient_cases']).\ register(r'meeting', meeting.MeetingViewSet, base_name='case-meeting', parents_query_lookups=['case_meetings'])
Is there anyway to do this with DRF extensions nested routers?
Thanks