def generate_patterns(django_name, gwt_name):
 pattern_list = defaults.patterns(django_name, ('^rpc/', 'views.handle_rpc'), ('^rpc_doc', 'views.rpc_documentation'))
 debug_pattern_list = defaults.patterns('', ('^(?P<forward_addr>autotest.*)', 'autotest.frontend.afe.views.gwt_forward'), ('^client/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.dirname(__file__), '..', 'frontend', 'client', 'www')}), ('^$', 'django.views.generic.simple.redirect_to', {'url': ('client/autotest.%(name)s/%(name)s.html' % dict(name=gwt_name))}))
 return (pattern_list, debug_pattern_list)

def generate_patterns ( django_name , gwt_name ) : pattern_list = defaults . patterns ( django_name , ( '^rpc/' , 'views.handle_rpc' ) , ( '^rpc_doc' , 'views.rpc_documentation' ) ) debug_pattern_list = defaults . patterns ( '' , ( '^(?P<forward_addr>autotest.*)' , 'autotest.frontend.afe.views.gwt_forward' ) , ( '^client/(?P<path>.*)$' , 'django.views.static.serve' , { 'document_root' : os . path . join ( os . path . dirname ( __file__ ) , '..' , 'frontend' , 'client' , 'www' ) } ) , ( '^$' , 'django.views.generic.simple.redirect_to' , { 'url' : ( 'client/autotest.%(name)s/%(name)s.html' % dict ( name = gwt_name ) ) } ) ) return ( pattern_list , debug_pattern_list )
generates the common url patterns for the given names .