def add_meta(self, post, *args, **kwargs): """ Replace description after meta updating """ super(Command, self).add_meta(post, *args, **kwargs) post.gen_description = False post.description = description_from_content(post) post.save()
def save(self, commit=True): post = super(BlogForm, self).save(commit=False) post.gen_description = False post.content = self.cleaned_data['content'] post.description = description_from_content(post) if commit: post.save() return post