Skip to content

Commit

Permalink
remove caching of content types at the start
Browse files Browse the repository at this point in the history
  • Loading branch information
bbmokhtari committed Oct 21, 2024
1 parent 253e772 commit 8a30902
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions translations/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,3 @@
class TranslationsConfig(AppConfig):
name = 'translations'
verbose_name = _('translations')

def ready(self):
try:
# cache all content types at the start
from django.contrib.contenttypes.models import ContentType
models = [ct.model_class() for ct in ContentType.objects.all()]
ContentType.objects.get_for_models(*models)
except Exception:
pass

0 comments on commit 8a30902

Please sign in to comment.