def url(regex, view, kwargs=None, name=None, prefix='<STR_LIT>'):
if isinstance(view, (list, tuple)):<EOL><INDENT>urlconf_module, app_name, namespace = view<EOL>return URLResolver(regex, urlconf_module, kwargs, app_name=app_name, namespace=namespace)<EOL><DEDENT>else:<EOL><INDENT>if isinstance(view, six.string_types):<EOL><INDENT>if not view:<EOL><INDENT>raise ImproperlyConfigured('<STR_LIT>' % regex)<EOL><DEDENT>if prefix:<EOL><INDENT>view = prefix + '<STR_LIT:.>' + view<EOL><DEDENT>view = get_callable(view)<EOL><DEDENT>return CBVRegexURLPattern(regex, view, kwargs, name)<EOL><DEDENT>
As url() in Django.