美文网首页
2020-06-19 django-admin-v2 修改版权信

2020-06-19 django-admin-v2 修改版权信

作者: 多吃水果少吃肉 | 来源:发表于2020-06-19 13:32 被阅读0次

在 templates 新建 base_site.html

{% extends 'admin/base_site.html' %}
{% load i18n static suit_tags %}

{% block footer %}
    {#    </div> <!-- Put footer outside #container -->#}
    {% if not is_popup %}
        <div id="footer">
        <div id="footer">
            <footer class="footer">
                <div class="container-fluid">
                    {% block footer_content %}
                        <div class="row">
                            <div class="col-xs-12 col-sm-6 text-sm-center footer-copyright">
                                {% block copyright %}
                                    Copyright &copy;
                                    <span class="hidden-md-down">2020-</span>{% now "Y" %}
                                    <br>{{ site_header|default:_('Django administration') }}
                                {% endblock %}
                            </div>

                        </div>
                    {% endblock %}
                </div>
            </footer>
        </div>
    {% endif %}
    {#  下面也要加上,否则会报 Suit not defined   #}
    <script src="{% static "suit/js/suit.js" %}"></script>
    {% if cl.formset or action_form and 'toggle_changelist_top_actions'|suit_conf:request %}
        <script type="text/javascript">
            Suit.ListActionsToggle.init();
        </script>
    {% elif adminform %}
        <script type="text/javascript">
            Suit.$("#{{ opts.model_name }}_form").suitFormDebounce();
            {% if 'form_submit_on_right'|suit_conf:request %}
                Suit.FixedBar.init();
            {% endif %}
            {% if adminform.model_admin.suit_form_tabs %}
                Suit.$(function () {
                    Suit.$('#suit_form_tabs').suitFormTabs();
                });
            {% endif %}
        </script>
    {% endif %}
{#    <div> <!-- Fix/close div previously closed by footer -->#}
{% endblock %}

相关文章

网友评论

      本文标题:2020-06-19 django-admin-v2 修改版权信

      本文链接:https://www.haomeiwen.com/subject/youvxktx.html