def add_variables_to_context(generator):
 context = generator.context
 context['relpath_to_site'] = relpath_to_site
 context['main_siteurl'] = _MAIN_SITEURL
 context['main_lang'] = _MAIN_LANG
 context['lang_siteurls'] = _SITE_DB
 current_lang = generator.settings['DEFAULT_LANG']
 extra_siteurls = _SITE_DB.copy()
 extra_siteurls.pop(current_lang)
 context['extra_siteurls'] = extra_siteurls

def add_variables_to_context ( generator ) : context = generator . context context [ 'relpath_to_site' ] = relpath_to_site context [ 'main_siteurl' ] = _MAIN_SITEURL context [ 'main_lang' ] = _MAIN_LANG context [ 'lang_siteurls' ] = _SITE_DB current_lang = generator . settings [ 'DEFAULT_LANG' ] extra_siteurls = _SITE_DB . copy ( ) extra_siteurls . pop ( current_lang ) context [ 'extra_siteurls' ] = extra_siteurls
adds useful iterable variables to template context .