#NEWLINE# @ property #NEWLINE# def regex( self ) : #NEWLINE# #INDENT# language_code = ( get_language ( ) or settings . LANGUAGE_CODE ) #NEWLINE# if ( language_code not in self . _regex_dict ) : #NEWLINE# #INDENT# if ( ( language_code == settings . LANGUAGE_CODE ) and ( not self . prefix_default_language ) ) : #NEWLINE# #INDENT# regex_string = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# regex_string = ( '^%s/' % language_code ) #NEWLINE# #UNINDENT# self . _regex_dict [ self ] = re . compile ( regex_string , re . UNICODE ) #NEWLINE# #UNINDENT# return self . _regex_dict [ language_code ]