3👍
✅
try this \w+
instead of \S+
and not ''
but the path to user views:
profile_patterns = patterns('userapp.views',
url(r'^profile/$', profile),
url(r'^thoughts/$', thoughts),
)
urlpatterns = patterns('',
url(r'^/user/(?P<username>\w+)/', include(profile_patterns)),
)
Source:stackexchange.com