好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

django搭建Bootstrap常用问题解决方法

 

1、进入页面,提示Creating a ModelForm without either the 'fields' attribute or the 'exclude'时

解决方法:打开forms.py文件,修改如下:

class TestModelForm(forms.ModelForm):     class Meta:         model = User         #model = Author         fields = "__all__"

 

2、进入页面,提示no such table xxx,没有找到该表里,

可以进到项目目录下,删除Migrations文件夹,再执行一下 python manage.py syncdb数据库同步后,开启服务即可。

查看更多关于django搭建Bootstrap常用问题解决方法的详细内容...

  阅读:33次