Skip to content

Instantly share code, notes, and snippets.

@chrysmur
Created March 5, 2020 08:46
Show Gist options
  • Save chrysmur/bd3aa97c905dafafa92dc7a6f4d4579f to your computer and use it in GitHub Desktop.
Save chrysmur/bd3aa97c905dafafa92dc7a6f4d4579f to your computer and use it in GitHub Desktop.
from django.contrib import admin
from django.urls import path, include
from rest_framework import routers
from employee_app import views
router = routers.DefaultRouter()
router.register('employees', views.EmployeeAPI)
router.register('departments', views.DepartmentsAPI)
router.register('deptemp', views.DeptEmpAPI)
router.register('deptmanager', views.DeptManagerAPI)
router.register('salaries', views.SalariesAPI)
router.register('titles', views.TitlesAPI)
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include(router.urls))
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment