Guest User

Untitled

a guest
Feb 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. def index(request):
  2. if request.method == 'POST':
  3. form = MainForm(request.POST)
  4. if form.is_valid():
  5. return HttpResponseRedirect('/battle/' + form.clean_data['option1'] + '/vs/' + form.clean_data['option2'] + '/')
  6. else:
  7. form = MainForm()
  8. return render_to_response('home.html', {'form': form})
Add Comment
Please, Sign In to add comment