From 22ac3d3046d8262d52606bf761b3df4fcd0d1795 Mon Sep 17 00:00:00 2001 From: littlewolf Date: Thu, 7 Nov 2019 11:49:59 +0300 Subject: [PATCH] add gallery relation --- apps/location/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/location/models.py b/apps/location/models.py index b89761c6..6657cffa 100644 --- a/apps/location/models.py +++ b/apps/location/models.py @@ -109,6 +109,8 @@ class City(models.Model): map_ref = models.CharField(max_length=255, blank=True, null=True) situation = models.CharField(max_length=255, blank=True, null=True) + gallery = models.ManyToManyField('gallery.Image', through='location.CityGallery') + objects = CityQuerySet.as_manager() class Meta: