python - the requested URL was not found on this server django -



python - the requested URL was not found on this server django -

i next youtube tutorial, , getting error...

getting error

the requested url /hello not found on server.

site/urls.py

urlpatterns = patterns('', url(r'^hello/$', article.views.hello), ... )

article/views.py

from django.shortcuts import render django.http import httpresponse def hello(request): name = 'mike' html = '<html><body> sup %s </body></html> ' %name homecoming httprequest(html)

site/settings.py

installed_apps = ( ... 'article', )

the request url /hello not have trailing slash (/). can create url pattern match / optionally appending ?:

url(r'^hello/?$', article.views.hello),

python regex django django-urls

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -