Skip to content

Instantly share code, notes, and snippets.

@Joel-hanson
Created July 31, 2020 10:40
Show Gist options
  • Save Joel-hanson/558f91ee9123d09120227cf9251c40a2 to your computer and use it in GitHub Desktop.
Save Joel-hanson/558f91ee9123d09120227cf9251c40a2 to your computer and use it in GitHub Desktop.
The urls for django rest framework
from django.urls import path, include
from rest_framework import routers
from .views import UploadViewSet
router = routers.DefaultRouter()
router.register(r'upload', UploadViewSet, basename="upload")
# Wire up our API using automatic URL routing.
urlpatterns = [
path('', include(router.urls)),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment