#NEWLINE# def solid_i18n_patterns( prefix , * args ) : #NEWLINE# #INDENT# '\n    Modified copy of django i18n_patterns.\n    Adds the language code prefix to every *non default language* URL pattern\n    within this function. This may only be used in the root URLconf,\n    not in an included URLconf.\n    Do not adds any language code prefix to default language URL pattern.\n    Default language must be set in settings.LANGUAGE_CODE\n    ' #NEWLINE# if isinstance ( prefix , six . string_types ) : #NEWLINE# #INDENT# warnings . warn ( 'Calling solid_i18n_patterns() with the `prefix` argument and with tuples instead of django.conf.urls.url() instances is deprecated and will no longer work in Django 2.0. Use a list of django.conf.urls.url() instances instead.' , PendingDeprecationWarning , stacklevel = 2 ) #NEWLINE# pattern_list = patterns ( prefix , * args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# pattern_list = ( [ prefix ] + list ( args ) ) #NEWLINE# #UNINDENT# if ( not settings . USE_I18N ) : #NEWLINE# #INDENT# return pattern_list #NEWLINE# #UNINDENT# return [ SolidLocaleRegexURLResolver ( pattern_list ) ]