<commit_before>from django.conf import settings as django_settings

def settings(request):
    # dict_settings = dict()
    # for key in django_settings._explicit_settings:
    #     dict_settings[key] = getattr(settings,key)
    return {'settings': django_settings}<commit_msg>Implemented new context_processor Now you can access to alternate url for your current page with<commit_after>from django.conf import settings as django_settings
from django.core.urlresolvers import resolve, reverse
from django.utils.translation import activate, get_language

def settings(request):
    return {'settings': django_settings}



def alternate_seo_url(request):
    alternate_url = dict()
    path = request.path
    url_parts = resolve( path )
    url = path
    cur_language = get_language()
    for lang_code, lang_name in django_settings.LANGUAGES :
        try:
            activate(lang_code)
            url = reverse( url_parts.view_name, kwargs=url_parts.kwargs )
            alternate_url[lang_code] = django_settings.SITE_URL+url
        finally:
            activate(cur_language)

    return {'alternate':alternate_url}
{'fraction_non_alphanumeric': 0.07562277580071175, 'fraction_numerical': 0.0, 'mean_word_length': 3.8491379310344827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4400724', 'n_tokens_mistral': 311, 'n_tokens_neox': 309, 'n_words': 83}