CommandError: App 'polls' has migrations

执行python manage.py sql polls时出现错误

E:\projects\djangotest\mysite>python manage.py sql polls
CommandError: App 'polls' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations.

处理:

删除migrations目录或者执行manage.py migrate

参考:http://stackoverflow.com/questions/24215005/django-commanderror-app-polls-has-migrations

你可能感兴趣的:(CommandError: App 'polls' has migrations)