Skip to content

Commit

Permalink
sample project
Browse files Browse the repository at this point in the history
  • Loading branch information
ZDNuMXo committed Nov 9, 2019
1 parent 3ad470b commit ae289b5
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 25 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.4
0.0.5
2 changes: 1 addition & 1 deletion adminlte3/templates/adminlte/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

{% block extra_head %}{% endblock %}
</head>
<body class="hold-transition skin-blue sidebar-mini {% block body_class %}{% block bodyclass %}{% endblock %}{% endblock %}">
<body class="hold-transition sidebar-mini {% block body_class %}{% block bodyclass %}{% endblock %}{% endblock %}">

{% block body %}
<div class="wrapper">
Expand Down
35 changes: 23 additions & 12 deletions adminlte3/templates/adminlte/lib/_main_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,33 @@
<li class="nav-header">{% block nav_heading %}MAIN NAVIGATION{% endblock %}</li>

{% block nav_links %}
<li>
<a href="#">
<i class="fa fa-dashboard"></i> <p>Example link</p>
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>Example link</p>
</a>
</li>
<li class="treeview">
<a href="#">
<i class="fa fa-group"></i> <p>Sub menu</p>
<p class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
<li class="nav-item">
<a href="#" class="nav-link active">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>Example link active</p>
</a>
</li>
<li class="nav-item has-tree-view ">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-object-group"></i> <p>Sub menu</p>
<p><i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="treeview-menu">
<li>
<a href="#">
<i class="fa fa-user"></i> Another link
<ul class="nav nav-treeview menu-open">
<li class="nav-item">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-circle"></i> link
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link active">
<i class="nav-icon fas fa-user"></i> Another link
</a>
</li>
</ul>
Expand Down
4 changes: 0 additions & 4 deletions adminlte3/templates/adminlte/pages/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
{% block header_tail %}
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
{% endblock %}

Expand Down Expand Up @@ -34,8 +32,6 @@

{% block body_tail %}
<script>
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor', {
textarea: 'content',
customstyle: [
Expand Down
21 changes: 15 additions & 6 deletions adminlte3/templates/adminlte/pages/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
{% extends 'adminlte/base.html' %}

{% block content %}
<div class="box">
<div class="box-body">
<div class="card">
<div class="card-body">
<table class="table table-bordered">
<tr>
<thead><tr>
<th>#</th>
<th>页面URL</th>
<th>操作</th>
<th>Title</th>
<th>Url</th>
</tr>
</thead>
<tbody>
{% for page in pager.items %}
<tr>
<td>{{ forloop.counter }}</td>
<td><a target="_blank" href="{% url 'adminlte.example.pages' page_id=page.id %}">{{ page.title }}</a></td>
<td><a href="{% url 'adminlte.example.page.edit' page_id=page.id %}">编辑</a></td>
</tr>
{% endfor %}
</tbody>
<thead><tr>
<th>#</th>
<th>Title</th>
<th>Url</th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
<div class="box-footer clearfix">
<div class="card-footer clearfix">
{% include 'adminlte/lib/_pagination.html' %}
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions django_adminlte3/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import url, include
from django.views.generic.base import TemplateView

urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='adminlte/index.html')),
url(r'^login/$', TemplateView.as_view(template_name='adminlte/login.html')),
path('admin/', admin.site.urls),
]
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-adminlte3',
name='django-adminlte-3',
version=open('VERSION').read().strip(),
author='d3n1z',
author_email='d3n1z@protonmail.com',
Expand All @@ -22,4 +22,5 @@
install_requires=[
'django',
],
python_requires='>=3.6',
)

0 comments on commit ae289b5

Please sign in to comment.