url.py
引用文件错误异常描述
Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.
#admin不需要include加载
url(r‘^admin/‘, admin.site.urls),
url(r‘^house/‘, include((‘house.urls‘, ‘house‘), namespace=‘house‘)),
异常描述
No module named ‘django.core.urlresolvers‘
django2.0 把原来的 django.core.urlresolvers 包 更改为了 django.urls包,所以我们需要把导入的包都修改一下就可以了。
from django.urls import reverse
原文:https://www.cnblogs.com/iFanLiwei/p/12873410.html