#NEWLINE# @ requires_multi_emails_mode #NEWLINE# @ login_required #NEWLINE# def delete_email( request , email_id , template_name = 'emailauth/delete_email.html' ) : #NEWLINE# #INDENT# user_email = get_object_or_404 ( UserEmail , id = email_id , user = request . user , verified = True ) #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# form = DeleteEmailForm ( request . user , request . POST ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# user_email . delete ( ) #NEWLINE# return HttpResponseRedirect ( reverse ( 'emailauth_account' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = DeleteEmailForm ( request . user ) #NEWLINE# #UNINDENT# context = RequestContext ( request ) #NEWLINE# return render_to_response ( template_name , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# 'email' : user_email , #NEWLINE# #UNINDENT# } , context_instance = context )