Skip to content

Commit e0da6c5

Browse files
authored
Merge pull request #204 from newpanjing/dev
Dev
2 parents eab6e41 + 107dba8 commit e0da6c5

File tree

8 files changed

+21
-7
lines changed

8 files changed

+21
-7
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ simpleui 特点
4343

4444
☕️ Element-UI + Vue 加持,让古老的django admin 焕然一新。
4545

46+
🦀 新增支持Django3.0,Python3.8、Python3.9,敢于做第一个吃螃蟹的人。
47+
4648
# 开发初衷
4749
Django Admin默认界面设计语言存在着的一些不足,比如色彩单一,大量线条的使用,分割化明显。将这些不足归类一下就是界面单调、雷同性明显、缺少惊喜。我们认为新的平台类视觉风格可以打破这些束缚,尝试一些新的探索,启发传统的设计认知,因此结合当下设计趋势,构思了Element+Django Admin的Simpleui。让Django Admin和Element产生完美的交互。配以最流行的后台设计风格,让Django Admin更加强大。
4850

doc/en/README_en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ simpleui Characteristics
4141

4242
☕️ `Element-UI` and `Vue` ,Let the `django admin` be better.
4343

44+
🦀 Add support for Django3.0 Python3.8, Python3.9, dares to do the first person to eat crab.
45+
4446
# Original intention of development
4547
`Django Admin` default interface design language has some shortcomings, such as single color, the use of a large number of lines, and obvious segmentation. To classify these shortcomings is that the interface is monotonous, obvious similarity, and lack of surprises. We believe that the new platform-like visual style can break these constraints, try some new explorations, and inspire traditional design cognition, so combined with the current design trend, I have conceived `Element+Django Admin's` Simpleui. Let `Django Admin` and `Element` make the perfect interaction. With the most popular back-end design style, let `Django Admin` is even more powerful.
4648

simpleui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
def get_version():
5-
return '3.7'
5+
return '3.8'

simpleui/static/admin/simpleui-x/automatic/dicts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var dicts = {
9393
//银行
9494
'fas fa-credit-card': ['银行卡', '银行', '信用卡', '储蓄卡'],
9595
//ad
96-
'fas fa-ad': ['宣传', '广告', 'banner', 'Banner', 'ad', 'Ad'],
96+
'fas fa-ad': ['宣传', '广告', 'banner', 'Banner', 'ad', 'Ad', '横幅', '轮播'],
9797
//hot
9898
'fab fa-hotjar': ['热搜', '热度', '火焰'],
9999
//info

simpleui/static/admin/simpleui-x/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@
477477
if (loading) {
478478
data.loading = true;
479479
this.loading = true;
480-
}else{
480+
} else {
481481
data.loading = false;
482482
this.loading = false;
483483
}

simpleui/templates/admin/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227

228228
{% home_page %}
229229

230-
231230
{% if home %}
232231
<span v-if="index==0" slot="label"><i
233232
class="{{ icon }}"></i><span>{{ title }}</span>
@@ -376,7 +375,7 @@
376375
<script type="text/javascript" src="{% static '/admin/simpleui-x/theme/theme.js' %}"></script>
377376
<script type="text/javascript" src="{% static '/admin/simpleui-x/waves/waves.min.js' %}?_=2.0.5"></script>
378377
{% block index_js %}
379-
<script type="text/javascript" src="{% static '/admin/simpleui-x/js/index.js' %}?_=3.4"></script>
378+
<script type="text/javascript" src="{% static '/admin/simpleui-x/js/index.js' %}?_=3.9"></script>
380379
{% endblock %}
381380
{% block autoupdate %}
382381
{% if not "SIMPLEUI_STATIC_OFFLINE"|get_config %}

simpleui/templates/admin/search_form.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@
8080
<el-option label="{{ option.1 }}" value="{{ option.0 }}"></el-option>
8181
{% endfor %}
8282
{% else %}
83-
<el-option label="True" value="True"></el-option>
84-
<el-option label="False" value="False"></el-option>
83+
{% get_boolean_choices as choices %}
84+
{% for c in choices %}
85+
<el-option label="{{ c.1 }}" value="{{ c.0 }}"></el-option>
86+
{% endfor %}
8587
{% endif %}
8688
</el-select>
8789

simpleui/templatetags/simpletags.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
register = template.Library()
2323

2424
PY_VER = sys.version[0] # 2 or 3
25+
from django.utils.translation import gettext_lazy as _
2526

2627
if PY_VER != '2':
2728
from importlib import reload
@@ -477,3 +478,11 @@ def has_admindoc_page(context):
477478
return context.template_name.find('admin_doc') == 0
478479
else:
479480
return False
481+
482+
483+
@register.simple_tag
484+
def get_boolean_choices():
485+
return (
486+
('True', _('Yes')),
487+
('False', _('No'))
488+
)

0 commit comments

Comments
 (0)