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__"