ErickPaul
ErickPaul

Reputation: 117

Python Page 404 not found

New to Python, just starting up with a Issue reporting app which involves an API module.

My Urls.py file:

urlpatterns = patterns('', 

url(r'^api/', include('api.urls')),

)

My api.urls file

urlpatterns = patterns('api.v1',
# Examples:
# url(r'^$', 'newproject.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

# authentication / session managemen
url(r'^auth/profile/me/$', 'account', name='my-account'),
url(r'^auth/profile/$', 'new_account', name='new-account'),
url(r'^auth/session/(?P<key>[a-z0-9]{64})/$', 'session', name='existing-session'),
url(r'^auth/session/$', 'new_session', name='new-session'),
....

My Web Page 404 Error

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

^api/

The current URL, , didn't match any of these.

I might be overlooking a mistake I made... Help Please? Using Django 1.9.7

Upvotes: 0

Views: 61

Answers (1)

willymwai
willymwai

Reputation: 61

replace url(r'^api/', include('api.urls')), with url(r'', include('api.urls')),

Upvotes: 1

Related Questions