我有一个project 跟目录的root url conf 设置内容为:
----------------------------------------------------------
from django.conf.urls import patterns, include, url import funnytest urlpatterns = patterns( url(r'^funnytest/', include('funnytest.urls')), url(r'^helloworld/', funnytest.views.hello), )
-----------------------------------------------------------
其中funnytest是其中一个app,funnytest 目录下设置了一个Urls, 内容为:
------------------
from django.conf.urls import patterns, include, url from views import * urlpatterns = patterns( url(r'^hello/$', hello), )
-------------------
我访问 localhost/funnytest/hello/ 会报错,表示urls 中没有匹配的配置
但是访问localhost/helloworld 是可以访问到view hello 的
为什么呢,应该如何配置~
http://stackoverflow.com/questions/12...