[Fixed]-Django: how to trigger creation of ContentTypes for new models?

14👍

You should use ContentType.objects.get_for_model(), which creates the ContentType instances on demand (it adds some caching as well).

👤Tobu

Leave a comment