#NEWLINE# def url( regex , view , kwargs = None , name = None , prefix = '' ) : #NEWLINE# #INDENT# 'As url() in Django.' #NEWLINE# if isinstance ( view , ( list , tuple ) ) : #NEWLINE# #INDENT# ( urlconf_module , app_name , namespace ) = view #NEWLINE# return RegexURLResolver ( regex , urlconf_module , kwargs , app_name = app_name , namespace = namespace ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( view , six . string_types ) : #NEWLINE# #INDENT# if ( not view ) : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( 'Empty URL pattern view name not permitted (for pattern %r)' % regex ) ) #NEWLINE# #UNINDENT# if prefix : #NEWLINE# #INDENT# view = ( ( prefix + '.' ) + view ) #NEWLINE# #UNINDENT# view = get_callable ( view ) #NEWLINE# #UNINDENT# return CBVRegexURLPattern ( regex , view , kwargs , name )