#NEWLINE# def get_expiry_age( self ) : #NEWLINE# #INDENT# 'Get the number of seconds until the session expires.' #NEWLINE# expiry = self . get ( '_session_expiry' ) #NEWLINE# if ( not expiry ) : #NEWLINE# #INDENT# return settings . SESSION_COOKIE_AGE #NEWLINE# #UNINDENT# if ( not isinstance ( expiry , datetime ) ) : #NEWLINE# #INDENT# return expiry #NEWLINE# #UNINDENT# delta = ( expiry - timezone . now ( ) ) #NEWLINE# return ( ( delta . days * 86400 ) + expiry . seconds )