mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-12-05 07:54:04 +03:00
fab6b8724a
fixes #2123
16 lines
336 B
Python
16 lines
336 B
Python
from django.conf import settings
|
|
from rest_framework.routers import DefaultRouter, SimpleRouter
|
|
|
|
from {{ cookiecutter.project_slug }}.users.api.views import UserViewSet
|
|
|
|
if settings.DEBUG:
|
|
router = DefaultRouter()
|
|
else:
|
|
router = SimpleRouter()
|
|
|
|
router.register("users", UserViewSet)
|
|
|
|
|
|
app_name = "api"
|
|
urlpatterns = router.urls
|