May 2020
Intermediate to advanced
404 pages
10h 52m
English
Recall how we created the / route and its corresponding view in the api app:
urlpatterns = [ path('', views.indexView), path('predict', views.predictView), # -- Add this line!]
This creates the /predict route. However, the view, predictView, is not yet created.
from django.http import JsonResponsedef predictView(request): # We will add more code below this line # We will add more code above this line return JsonResponse({"data": -1})
Notice the placeholders in the preceding lines. We'll add more here in the next steps.
Read now
Unlock full access