MHS
MHS

Reputation: 2350

Django URL white space Issue

I have just installed Django 1.10.3 and have made a project with application called profiles.

I have added a url url(r'^profiles/', include('profiles.urls')), in my_site/urls.py

and in profiles/urls.py I have added:

urlpatterns = [
    url(r'create^$', views.create_profile, name='create_profile'),
]

but on my web page I get this: ^profiles/ create^$ [name='create_profile'] due to which I can not get into my webpage. Please help me out.

I can't see webpage by either of these urls:

http://localhost:8000/profiles/create

http://localhost:8000/profiles/ create

Upvotes: 0

Views: 2159

Answers (1)

Jessie
Jessie

Reputation: 2475

Your regex is messed up. You have: r'create^$'. Remove the ^.

Upvotes: 3

Related Questions