Skip to content

Instantly share code, notes, and snippets.

@jwalt39
Created September 13, 2020 14:36
Show Gist options
  • Save jwalt39/526c7b4f1a2d9dd1b7bff522a9cca45e to your computer and use it in GitHub Desktop.
Save jwalt39/526c7b4f1a2d9dd1b7bff522a9cca45e to your computer and use it in GitHub Desktop.
from django.urls import include, path
from rest_framework import routers
from api import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
router.register(r'characters', views.CharacterViewSet)
# Setup automatic URL routing
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
# path('', views.index),
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment