sb管理仪表板引导3主题打包为可重用的django应用程序。
django-sb-admin的Python项目详细描述
简介
django sb admin是一个可恢复的django应用程序,它提供一个引导程序3 sb admin仪表板主题:
http://startbootstrap.com/template-overviews/sb-admin/
sb admin是一个免费下载的引导管理模板。此模板使用 默认的bootstrap 3样式以及各种强大的jquery插件 创建一个强大的框架,用于创建管理面板、web应用程序或后端仪表板。
安装
安装应用程序:
pip install django-sb-admin
将“django_sb_admin”添加到已安装的应用程序设置中,如下所示:
INSTALLED_APPS = ( ... 'django_sb_admin', )
如果要查看示例应用程序,请将以下内容添加到URL文件中:
url(r'^django-sb-admin/', include('django_sb_admin.urls')),
用法
复制以下空白模板:
django_sb_admin/sb_admin_blank.html
或:
扩展基础模板:
{% extends "django_sb_admin/base.html" %}
然后:
覆盖以下块:
{% block sb_admin_header %}<!-- Header of the page -->{% endblock sb_admin_header %} {% block sb_admin_title %}<!-- Title of the content the page -->{% endblock sb_admin_title %} {% block sb_admin_sidebar %}<!-- left sidebar -->{% endblock sb_admin_sidebar %} {% block sb_admin_navbar_right %}<!-- right top navbar -->{% endblock sb_admin_navbar_right %} {% block sb_admin_content %}<!-- content -->{% endblock sb_admin_content %}
要使用包含的登录页面,请在urls.py中输入以下内容:
url(r'^accounts/login/$', auth_views.login, {'template_name': 'django_sb_admin/examples/login.html'}),
约定
模板块
- 块的名称以sb_admin开始
额外费用
- 登录模板
- 基本模板中的消息支持
许可证
版权所有2015 Rafal Zawadzki
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
sb admin本身是根据apache许可证授权的 https://github.com/IronSummitMedia/startbootstrap-sb-admin/blob/gh-pages/LICENSE