@login_required
def diff_submit(request):
 data = {'svn_diff_form': forms.DiffForm(request.user.username), 'svn_diff_error_message': ''}
 if (request.method == 'POST'):
  temp_svn_directory = tempfile.mkdtemp()
  form = forms.DiffForm(request.user.username, temp_svn_directory, request.POST)
  if form.is_valid():
   form.commit_diff()
   view_helpers.set_mission_completed(request.user.get_profile(), 'svn_diff')
   return HttpResponseRedirect(reverse('svn_diff'))
  data['svn_diff_form'] = form
  shutil.rmtree(temp_svn_directory)
 request.method = 'GET'
 return Diff.as_view()(request, extra_context_data=data)

@ login_required def diff_submit ( request ) : data = { 'svn_diff_form' : forms . DiffForm ( request . user . username ) , 'svn_diff_error_message' : '' } if ( request . method == 'POST' ) : temp_svn_directory = tempfile . mkdtemp ( ) form = forms . DiffForm ( request . user . username , temp_svn_directory , request . POST ) if form . is_valid ( ) : form . commit_diff ( ) view_helpers . set_mission_completed ( request . user . get_profile ( ) , 'svn_diff' ) return HttpResponseRedirect ( reverse ( 'svn_diff' ) ) data [ 'svn_diff_form' ] = form shutil . rmtree ( temp_svn_directory ) request . method = 'GET' return Diff . as_view ( ) ( request , extra_context_data = data )
handle submitting the results of an svn diff to the mission 1 .