'C:\ Users \ huihuiqian \ mys ite \ posts \ urls.py'>'似乎没有任何模式。如果您在文件中看到有效的模式,则说明问题可能是由循环导入引起的。
mysite.urls.py
from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^posts/', include('posts.urls')),
]
post.urls.py
from django.conf.urls import url
from . import views
urlpartterns =[
url(r'^$',views.index, name='index')
];