Elisonguo Moshi
Elisonguo Moshi

Reputation: 1

Django routing - The empty path did not match any of these

Using the URLconf defined in pccb_model.urls, Django tried these URL patterns, in this order:

predictive/
admin/

The empty path didn't match any of these.

img

Upvotes: 0

Views: 332

Answers (1)

Sergei Osadchuk
Sergei Osadchuk

Reputation: 54

That's correct, you need to define a view for a default path in your pccb_model.urls module. Make sure you have a corresponding method in the views.py. For example:

urls.py

path('', views.index)

views.py

def index(request):
    return HttpResponse('test', status=200)

Upvotes: 1

Related Questions