<s> from django . conf import settings <EOL> from django . core . urlresolvers import resolve , Resolver404 <EOL> def site_info ( request ) : <EOL> return { '<STR_LIT>' : settings . SITE_VARIABLES } <EOL> def url_name ( request ) : <EOL> try : <EOL> match = resolve ( request . path ) <EOL> except Resolver404 : <EOL> return { } <EOL> else : <EOL> namespace , url_name = match . namespace , match . url_name <EOL> if namespace : <EOL> url_name = "<STR_LIT>" % ( namespace , url_name ) <EOL> return { '<STR_LIT>' : namespace , '<STR_LIT>' : url_name } <EOL> def get_host_with_scheme ( request ) : <EOL> return { <EOL> '<STR_LIT>' : request . build_absolute_uri ( '<STR_LIT:/>' ) . rstrip ( '<STR_LIT:/>' ) , <EOL> } </s>
