Example #1
0
    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()
Example #2
0
	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