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
Post a Comment