<s> __revision__ = '<STR_LIT>' <EOL> from django . shortcuts import render_to_response <EOL> from django . template import RequestContext <EOL> from django . conf import settings <EOL> from confirmation . models import Confirmation <EOL> def confirm ( request , confirmation_key ) : <EOL> confirmation_key = confirmation_key . lower ( ) <EOL> obj = Confirmation . objects . confirm ( confirmation_key ) <EOL> confirmed = True <EOL> if not obj : <EOL> confirmed = False <EOL> try : <EOL> obj = Confirmation . objects . get ( confirmation_key = confirmation_key ) <EOL> except Confirmation . DoesNotExist : <EOL> pass <EOL> ctx = { <EOL> '<STR_LIT:object>' : obj , <EOL> '<STR_LIT>' : confirmed , <EOL> '<STR_LIT>' : getattr ( settings , '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT:key>' : confirmation_key , <EOL> '<STR_LIT>' : request . GET . get ( "<STR_LIT>" , None ) , <EOL> '<STR_LIT>' : settings . ZULIP_ADMINISTRATOR , <EOL> '<STR_LIT>' : settings . VOYAGER <EOL> } <EOL> templates = [ <EOL> '<STR_LIT>' , <EOL> ] <EOL> if obj : <EOL> templates . insert ( <NUM_LIT:0> , '<STR_LIT>' % obj . _meta . model_name ) <EOL> return render_to_response ( templates , ctx , <EOL> context_instance = RequestContext ( request ) ) </s>
