#NEWLINE# @ requires_multi_emails_mode #NEWLINE# @ login_required #NEWLINE# def add_email( request , template_name = 'emailauth/add_email.html' ) : #NEWLINE# #INDENT# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# form = AddEmailForm ( request . POST ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# email_obj = UserEmail . objects . create_unverified_email ( form . cleaned_data [ 'email' ] , user = request . user ) #NEWLINE# email_obj . send_verification_email ( ) #NEWLINE# email_obj . save ( ) #NEWLINE# return HttpResponseRedirect ( reverse ( 'emailauth_add_email_continue' , args = [ quote_plus ( email_obj . email ) ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = AddEmailForm ( ) #NEWLINE# #UNINDENT# context = RequestContext ( request ) #NEWLINE# return render_to_response ( template_name , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } , context_instance = context )