parameters: (self, request, *args, **kwargs)
return_statement: return HttpResponseRedirect(self.get_success_url())
docstring: Handle POST requests: instantiate a form instance with the passed
          POST variables and then check if it's valid.
docstring_summary: Handle POST requests: instantiate a form instance with the passed
          POST variables and then check if it's valid.
docstring_tokens: Handle POST requests : instantiate a form instance with the passed POST variables and then check if it s valid .
function: def post(self, request, *args, **kwargs):
          """
          Handle POST requests: instantiate a form instance with the passed
          POST variables and then check if it's valid.
          """
          form = self.get_form()
          if form.is_valid():
              return self.form_valid(form)
  
          if 'username' not in form.cleaned_data or 'password' not in form.cleaned_data:
              return self.form_invalid(form)
  
          if User.objects.filter(username=form.cleaned_data['username']).exists():
              return self.form_invalid(form)
  
          user = User.objects.create_user(form.cleaned_data['username'], None, form.cleaned_data['password'])
          auth_login(request, user)
          return HttpResponseRedirect(self.get_success_url())
function_tokens: def post ( self , request , * args , * * kwargs ) : form = self . get_form ( ) if form . is_valid ( ) : return self . form_valid ( form ) if 'username' not in form . cleaned_data or 'password' not in form . cleaned_data : return self . form_invalid ( form ) if User . objects . filter ( username = form . cleaned_data [ 'username' ] ) . exists ( ) : return self . form_invalid ( form ) user = User . objects . create_user ( form . cleaned_data [ 'username' ] , None , form . cleaned_data [ 'password' ] ) auth_login ( request , user ) return HttpResponseRedirect ( self . get_success_url ( ) )