agateblue / django-dynamic-preferences

Dynamic global and instance settings for your django project
https://django-dynamic-preferences.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
350 stars 87 forks source link

Errors in docs for adding api urls #233

Closed benwhalley closed 2 years ago

benwhalley commented 3 years ago

In the docs it suggests:

router.register(r"global", GlobalPreferencesViewSet, base_name="global")

But base_name is now deprecated by rest_framework in favour of basename. Changing the argument name fixes this error.

Also, latest versions of Django throw and error when including urls like this:

url(r"^preferences/", include(router.urls, namespace="preferences"))

And instead it should be:

url(r"^preferences/", include((router.urls, "preferences"), namespace="preferences"))
agateblue commented 2 years ago

Closing, feel free to reopen / submit a PR if there is still something to fix on our side.