mirror of
https://github.com/Hopiu/cookiecutter-django.git
synced 2026-05-09 21:24:43 +00:00
13 lines
351 B
Python
13 lines
351 B
Python
from django.conf import settings
|
|
from rest_framework.routers import DefaultRouter
|
|
from rest_framework.routers import SimpleRouter
|
|
|
|
from {{ cookiecutter.project_slug }}.users.api.views import UserViewSet
|
|
|
|
router = DefaultRouter() if settings.DEBUG else SimpleRouter()
|
|
|
|
router.register("users", UserViewSet)
|
|
|
|
|
|
app_name = "api"
|
|
urlpatterns = router.urls
|