1.错误:NoReverseMatch at /admin/
修改: url(r'^admin/$', include(admin.site.urls)),
改为: url(r'^admin/', include(admin.site.urls)),
2.错误:找不到模板
修改:添加html所在文件路径
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates.webpage').replace('\\','/'),
'app/templates/webpage',
)3.Creating a ModelForm without either the ‘fields’ attribute or the ‘exclude’ attribute is prohibited; form ContactForm needs updating.
修改:
class Meta:
model = Test
fields = "__all__" 版权声明:本文为CCyutaotao原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。