How to move existing app to another directory

  1. Cut the app to the destinated directory.
  2. Check existing migration.py, views.py, urls.py, setting.py, 'apps.py'.
    I fixed it by going into all of the migration files and renaming these lines:
field=models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.CASCADE, to='books.models.Topic'),

to:

field=models.ForeignKey(default=1, null=True, on_delete=django.db.models.deletion.CASCADE, to='books.Topic')

你可能感兴趣的:(How to move existing app to another directory)