Example #1
0
 def save(self, *args, **kwargs):
     self.clean()
     if self.net_weight and self.net_weight > 0:
         self.gross_weight = max(self.net_weight, self.gross_weight)
     rv = super(Product, self).save(*args, **kwargs)
     generate_multilanguage_slugs(self, self._get_slug_name)
     return rv
Example #2
0
 def save(self, *args, **kwargs):
     self.clean()
     if self.net_weight and self.net_weight > 0:
         self.gross_weight = max(self.net_weight, self.gross_weight)
     rv = super(Product, self).save(*args, **kwargs)
     generate_multilanguage_slugs(self, self._get_slug_name)
     return rv
Example #3
0
    def save(self, *args, **kwargs):
        rv = super(Category, self).save(*args, **kwargs)
        generate_multilanguage_slugs(self, self._get_slug_name)

        # bump children cache
        from shuup.core import cache
        cache.bump_version("category_cached_children")

        return rv
Example #4
0
    def save(self, *args, **kwargs):
        rv = super(Category, self).save(*args, **kwargs)
        generate_multilanguage_slugs(self, self._get_slug_name)

        # bump children cache
        from shuup.core import cache
        cache.bump_version("category_cached_children")

        return rv
Example #5
0
 def save(self, *args, **kwargs):
     rv = super(Category, self).save(*args, **kwargs)
     generate_multilanguage_slugs(self, self._get_slug_name)
     return rv
Example #6
0
 def save(self, *args, **kwargs):
     rv = super(Category, self).save(*args, **kwargs)
     generate_multilanguage_slugs(self, self._get_slug_name)
     return rv