<commit_before>{% extends "base.html" %}
{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %}

{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Blog" %}{% endif %}{% endblock %}

{% block meta_keywords %}{% metablock %}
    {% keywords_for page as keywords %}
    {% for keyword in keywords %}
        {% if not forloop.first %}, {% endif %}
        {{ keyword }}
    {% endfor %}
{% endmetablock %}{% endblock %}

{% block meta_description %}{% metablock %}
    {{ page.description }}
{% endmetablock %}{% endblock %}

{% block title %}
    {% if page %}
        {% editable page.title %}{{ page.title }}{% endeditable %}
    {% else %}
        {% trans "Blog" %}
    {% endif %}
{% endblock %}

{% block breadcrumb_menu %}
    {{ block.super }}
    {% if tag or category or year or month or author %}
        <li>{% spaceless %}
            {% if tag %}
                {% trans "Tag:" %} {{ tag }}
                {% else %}{% if category %}
                    {% trans "Category:" %} {{ category }}
                    {% else %}{% if year or month %}
                        {% if month %}{{ month }}, {% endif %}{{ year }}
                        {% else %}{% if author %}
                            {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
                        {% endif %}{% endif %}{% endif %}{% endif %}
        {% endspaceless %}
        </li>
    {% endif %}
{% endblock %}

{% block main %}

    <div class="col-md-12 blog">

        {% if tag or category or year or month or author %}
            {% block blog_post_list_filterinfo %}
                <h4>
                    {% if tag %}
                        {% trans "Viewing posts tagged" %} <b>{{ tag }}</b>
                        {% else %}{% if category %}
                            {% trans "Viewing posts for the category" %} <b>{{ category }}</b>
                            {% else %}{% if year or month %}
                                {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
                                <b>{{ year }}</b>
                                {% else %}{% if author %}
                                    {% trans "Viewing posts by" %}
                                    <b>{{ author.get_full_name|default:author.username }}</b>
                                {% endif %}{% endif %}{% endif %}
                    {% endif %}
                </h4>
                <hr>
            {% endblock %}

        {% else %}
            {% if page %}
                {% block blog_post_list_pagecontent %}
                    {% if page.get_content_model.content %}
                        {% editable page.get_content_model.content %}
                            {{ page.get_content_model.content|richtext_filters|safe }}
                        {% endeditable %}
                    {% endif %}
                {% endblock %}
            {% endif %}
        {% endif %}







        {% for blog_post in blog_posts.object_list %}
            {% if blog_post.status == 2 %}

                {% block blog_post_list_post_title %}
                    {% editable blog_post.title %}
                        <h2>
                            <a href="{{ blog_post.get_absolute_url }}">{{ blog_post.title }}</a>
                        </h2>
                    {% endeditable %}
                {% endblock %}

                {% block blog_post_list_post_content %}
                    {% editable blog_post.content %}
                        {% if blog_post.description %}
                            {{ blog_post.description|richtext_filters|safe }}
                        {% else %}
                            {{ blog_post.description_from_content|safe }}
                        {% endif %}
                    {% endeditable %}
                {% endblock %}

                {% block blog_post_list_post_links %}
                    <div class="blog-list-detail">
                        <p align="left">
                            <a href="{{ blog_post.get_absolute_url }}"
                               class="btn btn-default btn-raised">{% trans "read more" %}</a>
                        </p>
                    </div>
                {% endblock %}
            {% endif %}
        {% endfor %}

        {% pagination_for blog_posts %}





        {% if settings.COMMENTS_DISQUS_SHORTNAME %}
            {% include "generic/includes/disqus_counts.html" %}
        {% endif %}

    </div>

{% endblock %}

{% block right_panel %}
    {% include "blog/includes/filter_panel.html" %}
{% endblock %}<commit_msg>Правка верстки, теперь если админ, то тоже видишь черновики<commit_after>{% extends "base.html" %}
{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %}

{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Blog" %}{% endif %}{% endblock %}

{% block meta_keywords %}{% metablock %}
    {% keywords_for page as keywords %}
    {% for keyword in keywords %}
        {% if not forloop.first %}, {% endif %}
        {{ keyword }}
    {% endfor %}
{% endmetablock %}{% endblock %}

{% block meta_description %}{% metablock %}
    {{ page.description }}
{% endmetablock %}{% endblock %}

{% block title %}
    {% if page %}
        {% editable page.title %}{{ page.title }}{% endeditable %}
    {% else %}
        {% trans "Blog" %}
    {% endif %}
{% endblock %}

{% block breadcrumb_menu %}
    {{ block.super }}
    {% if tag or category or year or month or author %}
        <li>{% spaceless %}
            {% if tag %}
                {% trans "Tag:" %} {{ tag }}
                {% else %}{% if category %}
                    {% trans "Category:" %} {{ category }}
                    {% else %}{% if year or month %}
                        {% if month %}{{ month }}, {% endif %}{{ year }}
                        {% else %}{% if author %}
                            {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
                        {% endif %}{% endif %}{% endif %}{% endif %}
        {% endspaceless %}
        </li>
    {% endif %}
{% endblock %}

{% block main %}

    <div class="col-md-12 blog">

        {% if tag or category or year or month or author %}
            {% block blog_post_list_filterinfo %}
                <h4>
                    {% if tag %}
                        {% trans "Viewing posts tagged" %} <b>{{ tag }}</b>
                        {% else %}{% if category %}
                            {% trans "Viewing posts for the category" %} <b>{{ category }}</b>
                            {% else %}{% if year or month %}
                                {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
                                <b>{{ year }}</b>
                                {% else %}{% if author %}
                                    {% trans "Viewing posts by" %}
                                    <b>{{ author.get_full_name|default:author.username }}</b>
                                {% endif %}{% endif %}{% endif %}
                    {% endif %}
                </h4>
                <hr>
            {% endblock %}

        {% else %}
            {% if page %}
                {% block blog_post_list_pagecontent %}
                    {% if page.get_content_model.content %}
                        {% editable page.get_content_model.content %}
                            {{ page.get_content_model.content|richtext_filters|safe }}
                        {% endeditable %}
                    {% endif %}
                {% endblock %}
            {% endif %}
        {% endif %}


        {% for blog_post in blog_posts.object_list %}
            {% if blog_post.status == 2 or request.user.is_staff %}

                {% block blog_post_list_post_title %}
                    {% editable blog_post.title %}
                        <h2>
                            <a href="{{ blog_post.get_absolute_url }}">{{ blog_post.title }}</a>
                        </h2>
                    {% endeditable %}
                {% endblock %}

                {% block blog_post_list_post_content %}
                    {% editable blog_post.content %}
                        {% if blog_post.description %}
                            {{ blog_post.description|richtext_filters|safe }}
                        {% else %}
                            {{ blog_post.description_from_content|safe }}
                        {% endif %}
                    {% endeditable %}
                {% endblock %}

                {% block blog_post_list_post_links %}
                    <div class="blog-list-detail">
                        <p align="left">
                            <a href="{{ blog_post.get_absolute_url }}"
                               class="btn btn-default btn-raised">{% trans "read more" %}</a>
                        </p>
                    </div>
                {% endblock %}
            {% endif %}
        {% endfor %}

        {% pagination_for blog_posts %}


        {% if settings.COMMENTS_DISQUS_SHORTNAME %}
            {% include "generic/includes/disqus_counts.html" %}
        {% endif %}

    </div>

{% endblock %}

{% block right_panel %}
    {% include "blog/includes/filter_panel.html" %}
{% endblock %}
{'fraction_non_alphanumeric': 0.1470493389229281, 'fraction_numerical': 0.0019348597226701064, 'mean_word_length': 1.2511492862327607, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6196115', 'n_tokens_mistral': 2856, 'n_tokens_neox': 2335, 'n_words': 532}