[Answered ]-Can't delete user after removing app

2πŸ‘

βœ…

To fully delete an app from Django you need to follow these steps:

  1. Remove any references to the app from all other apps and models, make migrations and apply them. (This will delete all foreign key relations to the models you want to remove)

  2. Comment out all the models for the app you want to remove and then make migrations and apply them. (This will drop all the tables for the models you want to delete)

  3. After all references in other apps have been removed and the app itself has no models, you can delete the files for the whole app.

  4. Finally you need to get rid of all the ContentType entries that were created on your initial migration run. You can do this by running the script found here: Remove Content Types

πŸ‘€Alex Carlos

Leave a comment