#NEWLINE# @ login_required #NEWLINE# def sponsor_add( request ) : #NEWLINE# #INDENT# if ( not request . user . is_staff ) : #NEWLINE# #INDENT# raise Http404 ( ) #NEWLINE# #UNINDENT# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# form = SponsorApplicationForm ( request . POST , user = request . user ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# sponsor = form . save ( commit = False ) #NEWLINE# sponsor . active = True #NEWLINE# sponsor . save ( ) #NEWLINE# return redirect ( 'sponsor_detail' , pk = sponsor . pk ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = SponsorApplicationForm ( user = request . user ) #NEWLINE# #UNINDENT# return render_to_response ( 'symposion/sponsorship/add.html' , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) )