[Solved]-Deleting unused Models, stale content types prompt

14👍

The contenttypes framework contains references to model tables. In this case, you have a stale reference to the table you just deleted. It is perfectly safe to answer yes and remove the stale contenttype. It would be a different story if you renamed a table that had a GenericForeignKey pointing to it, in which case other objects would have a ForeignKey to that ContentType, and the delete would cascade along those relations.

In a live environment, you can pass the --noinput option to suppress this prompt. However, it will default to no. It’s usually not really a problem to have some stale contenttypes lying around.

👤knbk

Leave a comment