mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-23 23:12:57 +03:00
15 lines
335 B
Python
15 lines
335 B
Python
|
from rest_framework.routers import DefaultRouter, SimpleRouter
|
||
|
from django.conf import settings
|
||
|
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
|