Skip to content
Advertisement

Need to have the correct url path in Django

I am trying to get my Django app to point to the correct URL in my chatserver/urls.py file.

I am getting this error when I start my django app:

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

admin/ join [name=’join’] The empty path didn’t match any of these.

This is my chatserver/urls.py file:

JavaScript

And this is my chat/urls.py file:

JavaScript

And here is my app project directory:

directory structure

How can I correct my error?

Advertisement

Answer

I would provide a name for my app in chat/urls.py

JavaScript

then for my chatserver/urls.py provide a namespace for each path

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement