14👍
✅
You should use ContentType.objects.get_for_model()
, which creates the ContentType
instances on demand (it adds some caching as well).
👤Tobu
Source:stackexchange.com