Python 更新Django,获得“包含的urlconf Site-main.url中没有任何模式”消息
我最近从Django的一个古老版本升级到了1.6.8,现在我发现上面描述的错误与下面描述的不一致 我在这里看到了几个讨论此错误的线程,而罪魁祸首通常似乎是在某处调用reverse的视图。然而,在我的任何观点中都没有这样做 事实上,我可以将我的网站的URL.py修剪为管理员网站Python 更新Django,获得“包含的urlconf Site-main.url中没有任何模式”消息,python,django,apache,Python,Django,Apache,我最近从Django的一个古老版本升级到了1.6.8,现在我发现上面描述的错误与下面描述的不一致 我在这里看到了几个讨论此错误的线程,而罪魁祸首通常似乎是在某处调用reverse的视图。然而,在我的任何观点中都没有这样做 事实上,我可以将我的网站的URL.py修剪为管理员网站 from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from d
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'Site-main.views.home', name='home'),
# url(r'^Site-main/', include('Site-main.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# This has to go before the admin site
url(r'^a/', include(admin.site.urls)),
)
…我仍然会定期收到错误
定期
这是另一件很奇怪的事。大约有一半的时间页面按预期加载,没有错误。剩下的时间我都会出错
另一件奇怪的事:如果我使用manage.py服务器而不是apache+wsgi,错误似乎会消失,但我已经让管理员完全重新启动apache,没有任何更改,所以我不认为这只是一个旧的、混乱的httpd进程造成的问题
有人有想法吗?很奇怪,管理员也有这个。。虽然没有定义名称空间!?如果设置DEBUG=False,是否会发生这种情况?