def forwards(self, orm): feedbacks = orm.StaticFeedback thematics = orm.Thematic for f in feedbacks.objects.all(): f.html_sentence = clean_string(f.html_sentence) f.save() for t in thematics.objects.all(): t.intro_description = clean_string(t.intro_description) t.outro_description = clean_string(t.outro_description) t.save()
def clean_feedback(sender, **kwargs): instance = kwargs.get('instance') instance.html_sentence = clean_string(instance.html_sentence)
def clean_thematic(sender, **kwargs): instance = kwargs.get('instance') instance.intro_description = clean_string(instance.intro_description) instance.outro_description = clean_string(instance.outro_description)