Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_name(request):
- # if this is a POST request we need to process the form data
- if request.method == 'POST':
- # create a form instance and populate it with data from the request:
- form = NameForm(request.POST)
- # check whether it's valid:
- if form.is_valid():
- # process the data in form.cleaned_data as required
- # ...
- # redirect to a new URL:
- username = form.cleaned_data['user_user']
- email_user = form.cleaned_data['user_email']
- pass_user = form.cleaned_data['user_pass']
- sender = form.cleaned_data['user_submit']
- # if a GET (or any other method) we'll create a blank form
- else:
- form = NameForm()
- return render(request, 'registration.html', {'form': form})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement