diff --git a/apps/establishment/models.py b/apps/establishment/models.py index d22aebaa..cb490aa4 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -119,11 +119,13 @@ class EstablishmentQuerySet(models.QuerySet): 'address__city__country') def with_extended_related(self): - return self.select_related('establishment_type'). \ + return self.with_extended_address_related().select_related('establishment_type'). \ prefetch_related('establishment_subtypes', 'awards', 'schedule', - 'phones'). \ + 'phones', 'gallery', 'menu_set', 'menu_set__plate_set', + 'menu_set__plate_set__currency', 'currency'). \ prefetch_actual_employees() + def with_type_related(self): return self.prefetch_related('establishment_subtypes') diff --git a/project/settings/production.py b/project/settings/production.py index 3192acea..e745f3bc 100644 --- a/project/settings/production.py +++ b/project/settings/production.py @@ -51,4 +51,6 @@ GUESTONLINE_SERVICE = 'https://api.guestonline.fr/' GUESTONLINE_TOKEN = '' LASTABLE_SERVICE = '' LASTABLE_TOKEN = '' -LASTABLE_PROXY = '' \ No newline at end of file +LASTABLE_PROXY = '' + +THUMBNAIL_FORCE_OVERWRITE = True # see: https://github.com/jazzband/sorl-thumbnail/issues/351 \ No newline at end of file