I'm new to the DRF. I tried to write an example by description on links:
http://james.lin.net.nz/2014/02/18/django-rest-framework-api-versioning/
django-rest-framework: api versioning
and share it: https://github.com/van2048/DRF_versioning
, but I get the error "NoReverseMatch at / app_drf/v1 /". Please tell me, that was not written correctly?
Try replacing your pattern with this in /app_drf/v1/urls.py:
router.register(r'^$', ver_views.AppDrfModelViewSet)
The $ is a regex operator that matches to the end of the string. https://docs.python.org/2/library/re.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With