diff --git a/README.md b/README.md index 19edb896..ca18d94d 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ simpleui 特点 ☕️ Element-UI + Vue 加持,让古老的django admin 焕然一新。 +🦀 新增支持Django3.0,Python3.8、Python3.9,敢于做第一个吃螃蟹的人。 + # 开发初衷 Django Admin默认界面设计语言存在着的一些不足,比如色彩单一,大量线条的使用,分割化明显。将这些不足归类一下就是界面单调、雷同性明显、缺少惊喜。我们认为新的平台类视觉风格可以打破这些束缚,尝试一些新的探索,启发传统的设计认知,因此结合当下设计趋势,构思了Element+Django Admin的Simpleui。让Django Admin和Element产生完美的交互。配以最流行的后台设计风格,让Django Admin更加强大。 diff --git a/doc/en/README_en.md b/doc/en/README_en.md index 27276b59..06dc3548 100644 --- a/doc/en/README_en.md +++ b/doc/en/README_en.md @@ -41,6 +41,8 @@ simpleui Characteristics ☕️ `Element-UI` and `Vue` ,Let the `django admin` be better. +🦀 Add support for Django3.0 Python3.8, Python3.9, dares to do the first person to eat crab. + # Original intention of development `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. diff --git a/simpleui/__init__.py b/simpleui/__init__.py index f049be97..b3e59a57 100644 --- a/simpleui/__init__.py +++ b/simpleui/__init__.py @@ -2,4 +2,4 @@ def get_version(): - return '3.7' + return '3.8' diff --git a/simpleui/static/admin/simpleui-x/automatic/dicts.js b/simpleui/static/admin/simpleui-x/automatic/dicts.js index df5e66d1..8bdf00bf 100644 --- a/simpleui/static/admin/simpleui-x/automatic/dicts.js +++ b/simpleui/static/admin/simpleui-x/automatic/dicts.js @@ -93,7 +93,7 @@ var dicts = { //银行 'fas fa-credit-card': ['银行卡', '银行', '信用卡', '储蓄卡'], //ad - 'fas fa-ad': ['宣传', '广告', 'banner', 'Banner', 'ad', 'Ad'], + 'fas fa-ad': ['宣传', '广告', 'banner', 'Banner', 'ad', 'Ad', '横幅', '轮播'], //hot 'fab fa-hotjar': ['热搜', '热度', '火焰'], //info diff --git a/simpleui/static/admin/simpleui-x/js/index.js b/simpleui/static/admin/simpleui-x/js/index.js index 4f8b2c70..c4721834 100644 --- a/simpleui/static/admin/simpleui-x/js/index.js +++ b/simpleui/static/admin/simpleui-x/js/index.js @@ -477,7 +477,7 @@ if (loading) { data.loading = true; this.loading = true; - }else{ + } else { data.loading = false; this.loading = false; } diff --git a/simpleui/templates/admin/index.html b/simpleui/templates/admin/index.html index 698022c6..06eed3b3 100755 --- a/simpleui/templates/admin/index.html +++ b/simpleui/templates/admin/index.html @@ -227,7 +227,6 @@ {% home_page %} - {% if home %} {{ title }} @@ -376,7 +375,7 @@ {% block index_js %} - + {% endblock %} {% block autoupdate %} {% if not "SIMPLEUI_STATIC_OFFLINE"|get_config %} diff --git a/simpleui/templates/admin/search_form.html b/simpleui/templates/admin/search_form.html index 8615338d..3a30654c 100644 --- a/simpleui/templates/admin/search_form.html +++ b/simpleui/templates/admin/search_form.html @@ -80,8 +80,10 @@ {% endfor %} {% else %} - - + {% get_boolean_choices as choices %} + {% for c in choices %} + + {% endfor %} {% endif %} diff --git a/simpleui/templatetags/simpletags.py b/simpleui/templatetags/simpletags.py index 4c187975..59aa8ad7 100644 --- a/simpleui/templatetags/simpletags.py +++ b/simpleui/templatetags/simpletags.py @@ -22,6 +22,7 @@ register = template.Library() PY_VER = sys.version[0] # 2 or 3 +from django.utils.translation import gettext_lazy as _ if PY_VER != '2': from importlib import reload @@ -477,3 +478,11 @@ def has_admindoc_page(context): return context.template_name.find('admin_doc') == 0 else: return False + + +@register.simple_tag +def get_boolean_choices(): + return ( + ('True', _('Yes')), + ('False', _('No')) + )