wtreston wtreston -4 years ago 73
Python Question

Django URLs arent working

Keep getting a 404 error whenever I try and access the site.

This is my urls.py in my app called


urlpatterns = [
url(r'ˆ$', views.index, name = 'index')

These are my urls.py:

from userprofile import urls

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'ˆusers/', include('userprofile.urls')),

and this is my views.py:

def index(request):
return HttpResponse("Hello, world. You're at the polls index.")

I don't get any errors in the console.

Not Found: /users/
[11/Jun/2017 17:17:47] "GET /users/ HTTP/1.1" 404 2036

and I have tried

Answer Source

You're using a different albeit look-alike character instead of the regex line start character:


Instead of:


>>> 'ˆ' == '^'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download