<commit_before>{% load i18n %}{% spaceless %}
<div class="cms_toolbar-item cms_toolbar-item-buttons cms_toolbar-item_switch_save-edit">
    {% if request.toolbar.edit_mode %}
    <a class="cms_btn cms_btn-switch-save" href="?{{ request.toolbar.edit_mode_url_off }}">
        {% trans "Save and close" %}
    </a>
    {% else %}
    <a class="cms_btn cms_btn-active cms_btn-switch-edit" href="?{{ request.toolbar.edit_mode_url_on }}">
        {% trans "Edit" %}
    </a>
    {% endif %}
</div>
{% endspaceless %}
<commit_msg>Use get_object_draft_url / get_object_public_url for mode switcher<commit_after>{% load i18n %}{% spaceless %}
<div class="cms_toolbar-item cms_toolbar-item-buttons cms_toolbar-item_switch_save-edit">
    {% if request.toolbar.edit_mode %}
    <a class="cms_btn cms_btn-switch-save" href="{{ request.toolbar.get_object_public_url }}?{{ request.toolbar.edit_mode_url_off }}">
        {% trans "Save and close" %}
    </a>
    {% else %}
    <a class="cms_btn cms_btn-active cms_btn-switch-edit" href="{{ request.toolbar.get_object_draft_url }}?{{ request.toolbar.edit_mode_url_on }}">
        {% trans "Edit" %}
    </a>
    {% endif %}
</div>
{% endspaceless %}

{'fraction_non_alphanumeric': 0.1711635750421585, 'fraction_numerical': 0.003372681281618887, 'mean_word_length': 3.9458333333333333, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6431541', 'n_tokens_mistral': 448, 'n_tokens_neox': 419, 'n_words': 73}