#NEWLINE# def validate_csrf_token( self , field ) : #NEWLINE# #INDENT# if ( not self . csrf_enabled ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( hasattr ( request , 'csrf_valid' ) and request . csrf_valid ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( not validate_csrf ( field . data , self . SECRET_KEY , self . TIME_LIMIT ) ) : #NEWLINE# #INDENT# raise ValidationError ( field . gettext ( 'CSRF token missing' ) )