def slug_generator(sender, instance, *args, **kwargs): if not instance.slug: instance.slug = unique_slug_generator(instance)
def product_pre_save_receiver(sender, instance, *args, **kwargs): """ this pre_save signal creates unique slug for created products """ if not instance.slug: instance.slug = unique_slug_generator(instance)
def tag_pre_save_receiver(sender, instance, *args, **kwargs): if not instance.slug: instance.slug = unique_slug_generator(instance)
def products_pre_save_receiver(sender, instance, *args, **kwargs): if not instance.product_slug: instance.product_slug = unique_slug_generator(sender, instance, *args, **kwargs)