@login_required
def checkout_submit(request):
 data = {'svn_checkout_form': forms.CheckoutForm(request.user.username), 'svn_checkout_error_message': ''}
 if (request.method == 'POST'):
  form = forms.CheckoutForm(request.user.username, request.POST)
  if form.is_valid():
   view_helpers.set_mission_completed(request.user.get_profile(), 'svn_checkout')
   return HttpResponseRedirect(reverse('svn_checkout'))
  data['svn_checkout_form'] = form
 request.method = 'GET'
 return Checkout.as_view()(request, extra_context_data=data)

@ login_required def checkout_submit ( request ) : data = { 'svn_checkout_form' : forms . CheckoutForm ( request . user . username ) , 'svn_checkout_error_message' : '' } if ( request . method == 'POST' ) : form = forms . CheckoutForm ( request . user . username , request . POST ) if form . is_valid ( ) : view_helpers . set_mission_completed ( request . user . get_profile ( ) , 'svn_checkout' ) return HttpResponseRedirect ( reverse ( 'svn_checkout' ) ) data [ 'svn_checkout_form' ] = form request . method = 'GET' return Checkout . as_view ( ) ( request , extra_context_data = data )
handle svn checkout mission step form and completion .