我收到一个奇怪的错误,并没有显示在谷歌上,它说:
ImportError at /scripts
No module named conf.urls
Request Method: GET
Request URL: http://127.0.0.1:8000/scripts
Django Version: 1.6.11
Exception Type: ImportError
Exception Value:
No module named conf.urls
Exception Location: ...scriptcity/fakedir/scripts/urls.py in <module>, line 1
有问题的文件是:
from django.conf.urls import *
from fakedir.scripts import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^bash/$', include('scripts.bash', namespace='bash')),
url(r'^autokey/$', include('scripts.autokey', namespace='autokey')),
url(r'^django/$', include('scripts.django', namespace='django')),
url(r'^python/$', include('scripts.python', namespace='python')),
url(r'^ruby/$', include('scripts.ruby', namespace='ruby')),
url(r'^practice/$', include('scripts.practice', namespace='practice')),
url(r'^bashrc/$', views.access_bashrc, name='bashrc'),
)
我的django.conf.urls
为from django.conf.urls import url, patterns, include
,同样的错误。我不明白为什么它忽略了“django”&#39;部分在开头。什么可能导致这个问题?谢谢