#NEWLINE# @ requires ( conf . ALLOW_SUBSCRIPTIONS ) #NEWLINE# def verify_subscription( request , ident ) : #NEWLINE# #INDENT# '\n    Verifies an unverified subscription and create or appends\n    to an existing subscription.\n    ' #NEWLINE# try : #NEWLINE# #INDENT# unverified = UnverifiedSubscription . objects . get ( ident = ident ) #NEWLINE# #UNINDENT# except UnverifiedSubscription . DoesNotExist : #NEWLINE# #INDENT# return respond ( 'overseer/invalid_subscription_token.html' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , request ) #NEWLINE# #UNINDENT# subscription = Subscription . objects . get_or_create ( email = unverified . email , defaults = { #NEWLINE# #INDENT# 'ident' : unverified . ident , #NEWLINE# #UNINDENT# } ) [ 0 ] #NEWLINE# subscription . services = unverified . services . all ( ) #NEWLINE# unverified . delete ( ) #NEWLINE# return respond ( 'overseer/subscription_confirmed.html' , { #NEWLINE# #INDENT# 'subscription' : subscription , #NEWLINE# #UNINDENT# } , request )