Django CommandError: App 'polls' has migrations

后端 未结 5 1472
面向向阳花
面向向阳花 2021-02-04 07:08

Trying to follow the tutorial at Django project.

The problem I\'ve come across is that when performing the command: python manage.py sql polls I\'m given th

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 07:28

    With django 1.7, instead of deleting app-name/migrations folder, In your MIGRATION_MODULES entry of your site, you can rename the application dictionary value with an non-existing module name by adding some dummy string:

    MIGRATION_MODULES['my_app'] += '_xx'

    And then manage.py sqlclear my_app works fine.

提交回复
热议问题