Django的URL正则表达式引擎失败了,我不明白为什么。甚至我的理智检查都失败了。
这是我的urls.py
:
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^a', 'placemyorder.views.home', name='home'),
)
我收到404错误:
Page not found (404)
Request Method: GET
Request URL: http://[ip address]/a/
Using the URLconf defined in placemyorder.urls, Django tried these URL patterns, in this order:
1. ^a [name='home']
The current URL, , didn't match any of these.
当我访问时
http://[ip address]/a
如果该信息相关,它将在Ubuntu 12.04上使用Python 2.7.3托管在Django 1.5.2上,如果该信息相关的话。
答案 0 :(得分:0)
以下是一条线索:The current URL, , didn't match any of these.
应该说:The current URL, http://[ip address]/a, didn't match any of these.
因此调度员没有收到请求网址。
看看这个解决方案:
Django + NGINX URL Problem