diff --git a/myblog/blog/forms.py b/myblog/blog/forms.py index 58e9042..6ddf81a 100644 --- a/myblog/blog/forms.py +++ b/myblog/blog/forms.py @@ -11,10 +11,10 @@ class Meta: def __init__(self, *args, **kwargs): self.entry = kwargs.pop('entry') # the blog entry instance - super(CommentForm, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def save(self): - comment = super(CommentForm, self).save(commit=False) + comment = super().save(commit=False) comment.entry = self.entry comment.save() return comment diff --git a/tutorials/05-forms.rst b/tutorials/05-forms.rst index 7ecd88c..062f6ed 100644 --- a/tutorials/05-forms.rst +++ b/tutorials/05-forms.rst @@ -214,10 +214,10 @@ Okay now let's finally write our form code. def __init__(self, *args, **kwargs): self.entry = kwargs.pop('entry') # the blog entry instance - super(CommentForm, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def save(self): - comment = super(CommentForm, self).save(commit=False) + comment = super().save(commit=False) comment.entry = self.entry comment.save() return comment