mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 11:04:04 +03:00
14 lines
351 B
Python
14 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
|