-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a88318
commit 624e7bc
Showing
4 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
@author: wuyue | ||
@contact: [email protected] | ||
@software: PyCharm | ||
@file: suit.py | ||
@create at: 2018-04-29 11:58 | ||
这一行开始写关于本文件的说明与解释 | ||
""" | ||
|
||
from django.contrib import admin | ||
from suit.apps import DjangoSuitConfig | ||
from suit.menu import ParentItem, ChildItem | ||
|
||
admin.AdminSite.site_header = 'rest_backend后台管理' | ||
|
||
|
||
class SuitConfig(DjangoSuitConfig): | ||
layout = 'vertical' | ||
menu = ( | ||
ParentItem('认证和授权', children=[ | ||
ChildItem(model='accounts.user'), | ||
ChildItem(model='auth.group'), | ||
], icon='fa fa-users'), | ||
ParentItem('设置', children=[ | ||
# ChildItem('修改密码', url='admin:password_change'), | ||
ChildItem('API接口文档', url='/api/docs', target_blank=True), | ||
|
||
], align_right=True, icon='fa fa-cog'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% extends 'admin/base.html' %} | ||
{% load suit_tags admin_static %} | ||
{% block footer %} | ||
{% if not is_popup %} | ||
<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 © | ||
<span class="hidden-md-down">2017-</span>{% now "Y" %} | ||
<br>{{ site_header }} by <a target="_blank" href="http://wuyue92tree.antio.top/opensource/rest-backend.html">WUYUE</a> | ||
{% endblock %} | ||
</div> | ||
|
||
</div> | ||
{% endblock %} | ||
</div> | ||
</footer> | ||
{% endif %} | ||
|
||
<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 %} | ||
{% endblock %} |