How to fix: "RuntimeWarning: Model <my_model> was already registered." How to fix: "RuntimeWarning: Model <my_model> was already registered." django django

How to fix: "RuntimeWarning: Model <my_model> was already registered."


Exactly the same problem had happened to me. The problem was that I had defined a model twice! Removing one of them solved the problem.


I have gotten this error because of automatic imports I had in my __init__.py. I had some old code that imported by signals there, and moving that import code to AppConfig instead fixed it.


Check in your models if you don't got a duplicate class model, sometimes when we make a rebase or merge in our existing branches, our code can be duplicated, i had the same problem, isn't a big deal.