Ejemplo n.º 1
0
 def save(self, commit=True):
     post = super().save(commit=False)
     if not post.hash_id:
         post.set_password(self.cleaned_data['password'])
         post.set_author(self.cleaned_data['password'])
     for tag in post.tags:
         Tag.register(tag)
     if commit:
         post.save()
     return post