May 2020
Intermediate to advanced
404 pages
10h 52m
English
Now that we've directed the project to use the apiui URL routes, we need to create the file required for this app. Create a file named urls.py within the apiui directory with the following content:
from django.urls import pathfrom . import viewsurlpatterns = [ path('', views.indexView, name='indexView'), path('<int:orderId>', views.viewOrder, name='viewOrder'),]
Save the file. Now that we've specified the routes available in the application, we need to create views for each of these routes, as we'll do in the next section.
Read now
Unlock full access