<s> from django . core . urlresolvers import reverse as _reverse <EOL> from django . contrib . staticfiles . templatetags . staticfiles import static as _static <EOL> from django . utils . functional import lazy <EOL> from . import base <EOL> def reverse ( viewname , args = None , kwargs = None , site_id = None ) : <EOL> """<STR_LIT>""" <EOL> if site_id is None : <EOL> site = base . get_current ( ) <EOL> else : <EOL> site = base . get_by_id ( site_id ) <EOL> url = _reverse ( viewname , args = args , kwargs = kwargs ) <EOL> url_tmpl = "<STR_LIT>" <EOL> scheme = site . scheme and "<STR_LIT>" . format ( site . scheme ) or "<STR_LIT>" <EOL> return url_tmpl . format ( scheme = scheme , domain = site . domain , url = url ) <EOL> def static ( path , site_id = None ) : <EOL> url = _static ( path ) <EOL> if url . startswith ( "<STR_LIT:http>" ) : <EOL> return url <EOL> if site_id is None : <EOL> site = base . get_current ( ) <EOL> else : <EOL> site = base . get_by_id ( site_id ) <EOL> url_tmpl = "<STR_LIT>" <EOL> scheme = site . scheme and "<STR_LIT>" . format ( site . scheme ) or "<STR_LIT>" <EOL> return url_tmpl . format ( scheme = scheme , domain = site . domain , url = url ) <EOL> reverse_lazy = lazy ( reverse , str ) <EOL> static_lazy = lazy ( static , str ) </s>
