def save(self, **kwargs): if self.slug is not None: from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) if self.in_geom is not None: self.longitude = self.in_geom.x self.latitude = self.in_geom.y try: self.region = RegionChild2.objects.get(boundaries__contains=self.in_geom) except: pass elif self.longitude is not None and self.latitude is not None: self.in_geom = 'POINT (' + str(self.latitude) + ' ' + str(self.longitude) + ' )' super(Lieu, self).save(**kwargs)
def save(self, **kwargs): if self.slug is not None: from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) if self.in_geom is not None: self.longitude = self.in_geom.x self.latitude = self.in_geom.y try: self.region = RegionChild2.objects.get( boundaries__contains=self.in_geom) except: pass elif self.longitude is not None and self.latitude is not None: self.in_geom = 'POINT (' + str(self.latitude) + ' ' + str( self.longitude) + ' )' super(Lieu, self).save(**kwargs)
def save(self, **kwargs): from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) super(Festival, self).save(**kwargs)
def save(self, **kwargs): from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) super(CategorieSpectacle, self).save(**kwargs)
def save(self, **kwargs): from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) super(RegionChild2, self).save(**kwargs)
def save(self, **kwargs): from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) if self.boundaries and isinstance(self.boundaries, geos.Polygon): self.boundaries = geos.MultiPolygon(self.boundaries) super(Region, self).save(**kwargs)
def save(self, **kwargs): from regionfestival.snippets import unique_slugify unique_slugify(self, self.name) super(CategorieAssociation, self).save(**kwargs)