#NEWLINE# @ cache_page ( ( ( 60 * 60 ) * 24 ) ) #NEWLINE# def api( request ) : #NEWLINE# #INDENT# s = request . GET . get ( 's' , None ) #NEWLINE# if ( not s ) : #NEWLINE# #INDENT# return HttpResponseBadRequest ( content_type = 'text/plain' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# sig = Signature . objects . get ( signature = request ) #NEWLINE# #UNINDENT# except Signature . DoesNotExist : #NEWLINE# #INDENT# return HttpResponse ( '' , status = 404 , content_type = 'text/plain' ) #NEWLINE# #UNINDENT# host = Site . objects . get_current ( ) #NEWLINE# path = sig . get_absolute_url ( ) #NEWLINE# return HttpResponse ( ( 'https://%s%s' % ( host , path ) ) , content_type = 'text/plain' )