code: def clean(self):
          
          if not self.instance.pk:
              # Only set user on post creation
              if not self.user.is_anonymous:
                  self.instance.poster = self.user
              else:
                  self.instance.anonymous_key = get_anonymous_user_forum_key(self.user)
          return super().clean()
docs: Validates the form.