parent
39b9b2b7e9
commit
586f2a7a03
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
|
|
@ -51,4 +51,6 @@ GUESTONLINE_SERVICE = 'https://api.guestonline.fr/'
|
|||
GUESTONLINE_TOKEN = ''
|
||||
LASTABLE_SERVICE = ''
|
||||
LASTABLE_TOKEN = ''
|
||||
LASTABLE_PROXY = ''
|
||||
LASTABLE_PROXY = ''
|
||||
|
||||
THUMBNAIL_FORCE_OVERWRITE = True # see: https://github.com/jazzband/sorl-thumbnail/issues/351
|
||||
Loading…
Reference in New Issue
Block a user