diff --git a/.gitattributes b/.gitattributes index 60264b7..8ccff99 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ *.html linguist-language=python -*.js linguist-language=python \ No newline at end of file +*.js linguist-language=python +*.css linguist-language=python \ No newline at end of file diff --git a/adminlteui/__init__.py b/adminlteui/__init__.py index 50b2f4f..68e9e47 100644 --- a/adminlteui/__init__.py +++ b/adminlteui/__init__.py @@ -1,2 +1,2 @@ -version = '2.0.0' +version = '2.1.0' default_app_config = 'adminlteui.apps.AdminlteUIConfig' diff --git a/adminlteui/admin.py b/adminlteui/admin.py index 9b2c271..238e697 100644 --- a/adminlteui/admin.py +++ b/adminlteui/admin.py @@ -7,10 +7,17 @@ class ModelAdmin(admin.ModelAdmin): class Media: css = { - "all": ("admin/components/select2/dist/css/select2.min.css",) + "all": ( + "admin/components/select2/dist/css/select2.min.css", + # for daterangefilter + "admin/components/bootstrap-daterangepicker/daterangepicker.css" + ) } js = ( "admin/components/select2/dist/js/select2.min.js", + # for daterangefilter + "admin/components/moment/moment-with-locales.min.js", + "admin/components/bootstrap-daterangepicker/daterangepicker.js", ) def changelist_view(self, request, extra_context=None): diff --git a/adminlteui/core.py b/adminlteui/core.py index bfb8bcb..b86ba54 100644 --- a/adminlteui/core.py +++ b/adminlteui/core.py @@ -39,6 +39,10 @@ def make(self, request, models=None, deep=1, deep_limit=0): menu_item['url'] = model.get('admin_url') elif self.menu_type == 'link': menu_item['url'] = self.url + # check permissions when permissions are not None + if self.permissions: + if request.user.has_perms(self.permissions) is False: + return None else: # menu_type: group and child is empty will hide the menu if not self.child: @@ -51,9 +55,14 @@ def make(self, request, models=None, deep=1, deep_limit=0): menu_item['target_blank'] = self.target_blank menu_item['menu_type'] = self.menu_type or 'group' + if menu_item['menu_type'] != 'group': + if menu_item['url'] == request.path: + menu_item['active'] = True + if self.child: if deep_limit == 0 or deep <= deep_limit: child_list = [] + has_child_active = False for child in self.child: deep += 1 child_menu = child.make(request, models, deep, deep_limit) @@ -62,8 +71,13 @@ def make(self, request, models=None, deep=1, deep_limit=0): if child_menu.get('menu_type', 'group') == 'group': if len(child_menu.get('child')) == 0: continue + if child_menu.get('active') is True: + has_child_active = True + child_list.append(child_menu) menu_item['child'] = child_list + if has_child_active is True: + menu_item['active'] = True else: return None return menu_item diff --git a/adminlteui/filters.py b/adminlteui/filters.py new file mode 100644 index 0000000..7d570d0 --- /dev/null +++ b/adminlteui/filters.py @@ -0,0 +1,67 @@ +import datetime + +from django.contrib import admin, messages +from django.db import models +from django.conf import settings +from django.utils import timezone +from django.utils.translation import gettext_lazy as _ + + +class DateRangeFilter(admin.FieldListFilter): + # Reference https://github.com/andreynovikov/django-daterangefilter + template = 'adminlte/date_range_filter.html' + date_format = 'YYYY/MM/DD' + + def __init__(self, field, request, params, model, model_admin, field_path): + self.field_name = field_path + self.lookup_kwarg_gte = '{}__gte'.format(field_path) + self.lookup_kwarg_lte = '{}__lte'.format(field_path) + self.lookup_gte = params.get(self.lookup_kwarg_gte) + self.lookup_lte = params.get(self.lookup_kwarg_lte) + + if self.lookup_gte == '': + params.pop(self.lookup_kwarg_gte) + + if self.lookup_lte == '': + params.pop(self.lookup_kwarg_lte) + if self.lookup_gte and self.lookup_lte: + self.lookup_val = '{} - {}'.format(self.lookup_gte, self.lookup_lte) + # if we are filtering DateTimeField we should add one day to final date + if "__" in field_path: + related_model, field = field_path.split("__") + field = model._meta.get_field(related_model).related_model._meta.get_field(field) + else: + field = model._meta.get_field(field_path) + + if isinstance(field, models.DateTimeField): + try: + gte_date = datetime.datetime.strptime(self.lookup_gte, '%Y-%m-%d') + lte_date = datetime.datetime.strptime(self.lookup_lte, '%Y-%m-%d') + lte_date = lte_date + datetime.timedelta(seconds=3600 * 24 - 1) + if settings.USE_TZ: + gte_date = timezone.make_aware(gte_date, timezone.get_current_timezone()) + lte_date = timezone.make_aware(lte_date, timezone.get_current_timezone()) + params[self.lookup_kwarg_gte] = gte_date.strftime('%Y-%m-%d %H:%M:%S%z') + params[self.lookup_kwarg_lte] = lte_date.strftime('%Y-%m-%d %H:%M:%S%z') + except ValueError: + messages.add_message(request, messages.ERROR, + _("Invalid date for '%(field_name)s' field range filter") % { + 'field_name': field.verbose_name}) + else: + self.lookup_val = '' + + super().__init__(field, request, params, model, model_admin, field_path) + + def choices(self, changelist): + yield { + 'field_name': self.field_path, + 'value': self.lookup_val, + 'date_format': self.date_format, + 'query_string': changelist.get_query_string(remove=self._get_expected_fields()) + } + + def expected_parameters(self): + return self._get_expected_fields() + + def _get_expected_fields(self): + return [self.lookup_kwarg_gte, self.lookup_kwarg_lte] diff --git a/adminlteui/locale/zh-Hans/LC_MESSAGES/django.mo b/adminlteui/locale/zh-Hans/LC_MESSAGES/django.mo deleted file mode 100644 index b2b447a..0000000 Binary files a/adminlteui/locale/zh-Hans/LC_MESSAGES/django.mo and /dev/null differ diff --git a/adminlteui/locale/zh-Hans/LC_MESSAGES/django.po b/adminlteui/locale/zh-Hans/LC_MESSAGES/django.po deleted file mode 100644 index c920978..0000000 --- a/adminlteui/locale/zh-Hans/LC_MESSAGES/django.po +++ /dev/null @@ -1,647 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-15 16:37+0800\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: adminlteui/admin.py:53 -msgid "Site Title" -msgstr "站点标题" - -#: adminlteui/admin.py:56 -msgid "Text to put at the end of each page's tag title." -msgstr "每个页面的标题后缀,对应templates中的site_title标签。" - -#: adminlteui/admin.py:57 -msgid "Site Header" -msgstr "站点标头" - -#: adminlteui/admin.py:60 -msgid "Text to put in base page's tag b." -msgstr "右上角文字标头,对应templates中的site_header标签。" - -#: adminlteui/admin.py:63 -msgid "Site Logo" -msgstr "站点logo" - -#: adminlteui/admin.py:67 -msgid "Transparent background picture is a good choice." -msgstr "透明背景的图片更适合。" - -#: adminlteui/admin.py:69 -msgid "Welcome Sign" -msgstr "欢迎标语" - -#: adminlteui/admin.py:71 -msgid "Login page welcome sign." -msgstr "登录页面欢迎标语" - -#: adminlteui/admin.py:74 -msgid "Avatar Field" -msgstr "头像字段" - -#: adminlteui/admin.py:78 -msgid "which field is avatar." -msgstr "用户表中头像对应的字段" - -#: adminlteui/admin.py:80 -msgid "Show Avatar" -msgstr "显示头像" - -#: adminlteui/admin.py:107 adminlteui/admin.py:125 -msgid "site_logo depends on setting.MEDIA_URL and setting.MEDIA_ROOT." -msgstr "site_logo依赖于setting.MEDIA_URL和setting.MEDIA_ROOT。" - -#: adminlteui/admin.py:218 -msgid "General Option Saved." -msgstr "基本设置保存成功。" - -#: adminlteui/admin.py:221 -msgid "General Option Save Failed." -msgstr "基本设置保存失败。" - -#: adminlteui/admin.py:250 adminlteui/admin.py:336 adminlteui/models.py:52 -msgid "ContentType" -msgstr "关联Model" - -#: adminlteui/admin.py:260 adminlteui/admin.py:263 -#, python-format -msgid "Exception raised while add node: %s" -msgstr "在添加菜单时,发生异常:%s" - -#: adminlteui/admin.py:293 -msgid "Menu exchanged, current is `custom menu`." -msgstr "菜单切换成功,当前为`自定义菜单`" - -#: adminlteui/admin.py:299 -msgid "Menu exchanged, current is `system menu`." -msgstr "菜单切换成功,当前为`系统菜单`" - -#: adminlteui/admin.py:320 adminlteui/models.py:43 -msgid "Link" -msgstr "链接" - -#: adminlteui/admin.py:328 adminlteui/models.py:49 -msgid "Icon" -msgstr "图标" - -#: adminlteui/apps.py:12 adminlteui/templates/adminlte/general_option.html:13 -msgid "AdminSettings" -msgstr "设置" - -#: adminlteui/models.py:14 -msgid "Option Name" -msgstr "名称" - -#: adminlteui/models.py:16 -msgid "Option Value" -msgstr "值" - -#: adminlteui/models.py:17 adminlteui/models.py:59 -msgid "Valid" -msgstr "有效性" - -#: adminlteui/models.py:19 -msgid "CreateTime" -msgstr "创建时间" - -#: adminlteui/models.py:21 -msgid "UpdateTime" -msgstr "更新时间" - -#: adminlteui/models.py:27 -msgid "Options" -msgstr "选项" - -#: adminlteui/models.py:28 -msgid "All Options" -msgstr "所有选项" - -#: adminlteui/models.py:33 -msgid "Internal" -msgstr "内部" - -#: adminlteui/models.py:34 -msgid "External" -msgstr "外部" - -#: adminlteui/models.py:35 -msgid "Divide" -msgstr "链接分组" - -#: adminlteui/models.py:37 -#, fuzzy -#| msgid "username" -msgid "name" -msgstr "用户名" - -#: adminlteui/models.py:39 -msgid "Menu Position" -msgstr "菜单位置" - -#: adminlteui/models.py:41 -msgid "Link Type" -msgstr "链接类型" - -#: adminlteui/models.py:45 -msgid "support admin:index or /admin/ or http://" -msgstr "支持 admin:index 或 /admin/ 或 http://" - -#: adminlteui/models.py:55 -msgid "use for permission control." -msgstr "用于权限控制。" - -#: adminlteui/models.py:57 -msgid "Priority Level" -msgstr "优先级" - -#: adminlteui/models.py:58 -msgid "The bigger the priority" -msgstr "越大越优先" - -#: adminlteui/models.py:71 -msgid "max depth is 2." -msgstr "菜单最大深度为2" - -#: adminlteui/models.py:78 -msgid "Menu" -msgstr "菜单" - -#: adminlteui/models.py:79 -msgid "Menu Setting" -msgstr "菜单设置" - -#: adminlteui/templates/admin/404.html:4 adminlteui/templates/admin/404.html:6 -msgid "Page not found" -msgstr "" - -#: adminlteui/templates/admin/404.html:10 -msgid "We're sorry, but the requested page could not be found." -msgstr "" - -#: adminlteui/templates/admin/500.html:7 -#: adminlteui/templates/admin/auth/user/change_password.html:18 -#: adminlteui/templates/admin/change_form.html:21 -#: adminlteui/templates/admin/change_list.html:28 -#: adminlteui/templates/admin/delete_confirmation.html:14 -#: adminlteui/templates/admin/delete_selected_confirmation.html:14 -#: adminlteui/templates/admin/index.html:14 -#: adminlteui/templates/admin/invalid_setup.html:6 -#: adminlteui/templates/admin/object_history.html:11 -#: adminlteui/templates/adminlte/general_option.html:12 -#: adminlteui/templates/registration/password_change_done.html:6 -#: adminlteui/templates/registration/password_change_form.html:11 -msgid "Home" -msgstr "" - -#: adminlteui/templates/admin/500.html:8 -msgid "Server error" -msgstr "" - -#: adminlteui/templates/admin/500.html:12 -msgid "Server error (500)" -msgstr "" - -#: adminlteui/templates/admin/500.html:14 -msgid "Server Error (500)" -msgstr "" - -#: adminlteui/templates/admin/500.html:18 -msgid "" -"There's been an error. It's been reported to the site administrators via " -"email and should be fixed shortly. Thanks for your patience." -msgstr "" - -#: adminlteui/templates/admin/actions.html:10 -msgid "Run the selected action" -msgstr "" - -#: adminlteui/templates/admin/actions.html:10 -msgid "Go" -msgstr "" - -#: adminlteui/templates/admin/actions.html:18 -msgid "Click here to select the objects across all pages" -msgstr "" - -#: adminlteui/templates/admin/actions.html:18 -#, python-format -msgid "Select all %(total_count)s %(module_name)s" -msgstr "" - -#: adminlteui/templates/admin/actions.html:20 -msgid "Clear selection" -msgstr "" - -#: adminlteui/templates/admin/auth/user/add_form.html:6 -msgid "" -"First, enter a username and password. Then, you'll be able to edit more user " -"options." -msgstr "" - -#: adminlteui/templates/admin/auth/user/add_form.html:8 -msgid "Enter a username and password." -msgstr "" - -#: adminlteui/templates/admin/auth/user/change_password.html:22 -#: adminlteui/templates/admin/auth/user/change_password.html:27 -#: adminlteui/templates/admin/auth/user/change_password.html:94 -#: adminlteui/templates/admin/base.html:182 -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 -#: adminlteui/templates/registration/password_change_form.html:102 -msgid "Change password" -msgstr "" - -#: adminlteui/templates/admin/auth/user/change_password.html:36 -#, python-format -msgid "Enter a new password for the user %(username)s." -msgstr "" - -#: adminlteui/templates/admin/auth/user/change_password.html:48 -#: adminlteui/templates/admin/change_form.html:53 -#: adminlteui/templates/admin/change_list.html:55 -#: adminlteui/templates/registration/password_change_form.html:37 -msgid "Please correct the error below." -msgstr "" - -#: adminlteui/templates/admin/auth/user/change_password.html:48 -#: adminlteui/templates/admin/change_form.html:53 -#: adminlteui/templates/admin/change_list.html:55 -#: adminlteui/templates/registration/password_change_form.html:37 -msgid "Please correct the errors below." -msgstr "" - -#: adminlteui/templates/admin/base.html:135 -#: adminlteui/templates/admin/base.html:151 -msgid "Super manager" -msgstr "超级管理员" - -#: adminlteui/templates/admin/base.html:140 -#: adminlteui/templates/admin/base.html:156 -msgid "Normal" -msgstr "普通用户" - -#: adminlteui/templates/admin/base.html:143 -#: adminlteui/templates/admin/base.html:159 -msgid "Register time" -msgstr "注册时间" - -#: adminlteui/templates/admin/base.html:185 -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 -msgid "Log out" -msgstr "" - -#: adminlteui/templates/admin/base.html:218 -msgid "Online" -msgstr "在线" - -#: adminlteui/templates/admin/base.html:226 -#: adminlteui/templates/admin/search_form.html:20 -msgid "Search" -msgstr "搜索" - -#: adminlteui/templates/admin/base.html:238 -msgid "MAIN NAVIGATION" -msgstr "页面导航" - -#: adminlteui/templates/admin/base.html:241 -msgid "Dashboard" -msgstr "仪表盘" - -#: adminlteui/templates/admin/base_site.html:8 -#: adminlteui/templates/admin/login.html:13 -#: adminlteui/templates/adminlte/general_option.html:23 -#: adminlteui/templates/registration/logged_out.html:13 -msgid "Django site admin" -msgstr "" - -#: adminlteui/templates/admin/change_form.html:24 -#, python-format -msgid "Add %(name)s" -msgstr "" - -#: adminlteui/templates/admin/change_form.html:100 -msgid "change form tools" -msgstr "操作面板" - -#: adminlteui/templates/admin/change_list_object_tools.html:7 -#, python-format -msgid "   Add %(name)s" -msgstr "   增加 %(name)s" - -#: adminlteui/templates/admin/delete_confirmation.html:18 -#: adminlteui/templates/admin/delete_confirmation.html:22 -#: adminlteui/templates/admin/delete_confirmation.html:32 -#: adminlteui/templates/admin/submit_line.html:13 -msgid "Delete" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:39 -#, python-format -msgid "" -"Deleting the %(object_name)s '%(escaped_object)s' would result in deleting " -"related objects, but your account doesn't have permission to delete the " -"following types of objects:" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:46 -#, python-format -msgid "" -"Deleting the %(object_name)s '%(escaped_object)s' would require deleting the " -"following protected related objects:" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:53 -#, python-format -msgid "" -"Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? " -"All of the following related items will be deleted:" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:55 -#: adminlteui/templates/admin/delete_selected_confirmation.html:53 -msgid "Objects" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:62 -#: adminlteui/templates/admin/delete_selected_confirmation.html:64 -msgid "Yes, I'm sure" -msgstr "" - -#: adminlteui/templates/admin/delete_confirmation.html:63 -#: adminlteui/templates/admin/delete_selected_confirmation.html:65 -msgid "No, take me back" -msgstr "" - -#: adminlteui/templates/admin/delete_selected_confirmation.html:17 -#: adminlteui/templates/admin/delete_selected_confirmation.html:21 -#: adminlteui/templates/admin/delete_selected_confirmation.html:30 -msgid "Delete multiple objects" -msgstr "" - -#: adminlteui/templates/admin/delete_selected_confirmation.html:37 -#, python-format -msgid "" -"Deleting the selected %(objects_name)s would result in deleting related " -"objects, but your account doesn't have permission to delete the following " -"types of objects:" -msgstr "" - -#: adminlteui/templates/admin/delete_selected_confirmation.html:44 -#, python-format -msgid "" -"Deleting the selected %(objects_name)s would require deleting the following " -"protected related objects:" -msgstr "" - -#: adminlteui/templates/admin/delete_selected_confirmation.html:51 -#, python-format -msgid "" -"Are you sure you want to delete the selected %(objects_name)s? All of the " -"following objects and their related items will be deleted:" -msgstr "" - -#: adminlteui/templates/admin/edit_inline/stacked.html:18 -#: adminlteui/templates/admin/edit_inline/tabular.html:38 -#: adminlteui/templates/admin/index.html:47 -msgid "Change" -msgstr "" - -#: adminlteui/templates/admin/edit_inline/stacked.html:18 -#: adminlteui/templates/admin/edit_inline/tabular.html:38 -#: adminlteui/templates/admin/index.html:45 -msgid "View" -msgstr "" - -#: adminlteui/templates/admin/edit_inline/stacked.html:20 -#: adminlteui/templates/admin/edit_inline/tabular.html:40 -msgid "View on site" -msgstr "" - -#: adminlteui/templates/admin/edit_inline/tabular.html:24 -msgid "Delete?" -msgstr "" - -#: adminlteui/templates/admin/includes/object_delete_summary.html:2 -msgid "Summary" -msgstr "" - -#: adminlteui/templates/admin/index.html:10 -#: adminlteui/templates/admin/index.html:15 -msgid "dashboard" -msgstr "仪表盘" - -#: adminlteui/templates/admin/index.html:39 -msgid "Add" -msgstr "" - -#: adminlteui/templates/admin/index.html:69 -msgid "My Applications" -msgstr "我的应用" - -#: adminlteui/templates/admin/index.html:83 -msgid "My tables" -msgstr "我的表格" - -#: adminlteui/templates/admin/index.html:125 -msgid "Recent actions" -msgstr "" - -#: adminlteui/templates/admin/index.html:126 -msgid "My actions" -msgstr "" - -#: adminlteui/templates/admin/index.html:130 -msgid "None available" -msgstr "" - -#: adminlteui/templates/admin/index.html:146 -msgid "Unknown content" -msgstr "" - -#: adminlteui/templates/admin/index.html:164 -msgid "You don't have permission to view or edit anything." -msgstr "" - -#: adminlteui/templates/admin/invalid_setup.html:14 -msgid "" -"Something's wrong with your database installation. Make sure the appropriate " -"database tables have been created, and make sure the database is readable by " -"the appropriate user." -msgstr "" - -#: adminlteui/templates/admin/login.html:15 -#: adminlteui/templates/admin/login.html:90 -msgid "Log in" -msgstr "登录" - -#: adminlteui/templates/admin/login.html:60 -#: adminlteui/templates/registration/logged_out.html:58 -msgid "Login and Enjoy" -msgstr "芝麻开门" - -#: adminlteui/templates/admin/login.html:73 -msgid "username" -msgstr "用户名" - -#: adminlteui/templates/admin/login.html:77 -msgid "password" -msgstr "密码" - -#: adminlteui/templates/admin/login.html:84 -msgid "Remember me" -msgstr "记住我" - -#: adminlteui/templates/admin/login.html:97 -msgid "Other" -msgstr "更多" - -#: adminlteui/templates/admin/login.html:98 -msgid "Sign in using Facebook" -msgstr "" - -#: adminlteui/templates/admin/login.html:99 -msgid "Sign in using Google+" -msgstr "" - -#: adminlteui/templates/admin/object_history.html:15 -#: adminlteui/templates/admin/object_history.html:19 -#: adminlteui/templates/admin/object_history.html:28 -msgid "History" -msgstr "" - -#: adminlteui/templates/admin/object_history.html:39 -msgid "Date/time" -msgstr "" - -#: adminlteui/templates/admin/object_history.html:40 -msgid "User" -msgstr "" - -#: adminlteui/templates/admin/object_history.html:41 -msgid "Action" -msgstr "" - -#: adminlteui/templates/admin/object_history.html:55 -msgid "" -"This object doesn't have a change history. It probably wasn't added via this " -"admin site." -msgstr "" - -#: adminlteui/templates/admin/pagination.html:14 -#: adminlteui/templates/admin/search_form.html:22 -msgid "Show all" -msgstr "" - -#: adminlteui/templates/admin/pagination.html:17 -#: adminlteui/templates/admin/submit_line.html:5 -#: adminlteui/templates/adminlte/general_option.html:47 -msgid "Save" -msgstr "保存" - -#: adminlteui/templates/admin/pagination.html:29 -msgid "Previous" -msgstr "上一页" - -#: adminlteui/templates/admin/pagination.html:37 -msgid "Next" -msgstr "下一页" - -#: adminlteui/templates/admin/search_form.html:22 -#, python-format -msgid "%(counter)s result" -msgid_plural "%(counter)s results" -msgstr[0] "" -msgstr[1] "" - -#: adminlteui/templates/admin/search_form.html:22 -#, python-format -msgid "%(full_result_count)s total" -msgstr "" - -#: adminlteui/templates/admin/submit_line.html:19 -msgid "Save as new" -msgstr "" - -#: adminlteui/templates/admin/submit_line.html:25 -msgid "Save and add another" -msgstr "" - -#: adminlteui/templates/admin/submit_line.html:33 -msgid "Save and continue editing" -msgstr "" - -#: adminlteui/templates/admin/submit_line.html:33 -msgid "Save and view" -msgstr "" - -#: adminlteui/templates/admin/submit_line.html:39 -msgid "Close" -msgstr "" - -#: adminlteui/templates/adminlte/general_option.html:14 -#: adminlteui/templates/adminlte/general_option.html:18 -#: adminlteui/templates/adminlte/general_option.html:27 -#: adminlteui/templates/adminlte/general_option.html:36 -msgid "General Option" -msgstr "基本设置" - -#: adminlteui/templates/adminlte/menu_change_list.html:16 -msgid "Exchange Menu" -msgstr "菜单切换" - -#: adminlteui/templates/registration/logged_out.html:15 -#: adminlteui/templates/registration/logged_out.html:63 -#, fuzzy -#| msgid "Log in" -msgid "Log in again" -msgstr "登录" - -#: adminlteui/templates/registration/logged_out.html:61 -msgid "Thanks for spending some quality time with the Web site today." -msgstr "" - -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 -msgid "Documentation" -msgstr "" - -#: adminlteui/templates/registration/password_change_done.html:7 -#: adminlteui/templates/registration/password_change_form.html:12 -#, fuzzy -#| msgid "password" -msgid "Password change" -msgstr "密码" - -#: adminlteui/templates/registration/password_change_done.html:14 -msgid "Your password was changed." -msgstr "" - -#: adminlteui/templates/registration/password_change_form.html:27 -msgid "" -"Please enter your old password, for security's sake, and then enter your new " -"password twice so we can verify you typed it in correctly." -msgstr "" - -#: adminlteui/templatetags/adminlte_list.py:172 -msgid "Return to ordered tree" -msgstr "" - -#: adminlteui/templatetags/adminlte_menu.py:147 -msgid "General Options" -msgstr "基本设置" diff --git a/adminlteui/locale/zh/LC_MESSAGES/django.mo b/adminlteui/locale/zh/LC_MESSAGES/django.mo index b2b447a..597b317 100644 Binary files a/adminlteui/locale/zh/LC_MESSAGES/django.mo and b/adminlteui/locale/zh/LC_MESSAGES/django.mo differ diff --git a/adminlteui/locale/zh/LC_MESSAGES/django.po b/adminlteui/locale/zh/LC_MESSAGES/django.po index c920978..c22cfaf 100644 --- a/adminlteui/locale/zh/LC_MESSAGES/django.po +++ b/adminlteui/locale/zh/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-15 16:37+0800\n" +"POT-Creation-Date: 2023-07-04 11:58+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,342 +16,184 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" -#: adminlteui/admin.py:53 -msgid "Site Title" -msgstr "站点标题" - -#: adminlteui/admin.py:56 -msgid "Text to put at the end of each page's tag title." -msgstr "每个页面的标题后缀,对应templates中的site_title标签。" - -#: adminlteui/admin.py:57 -msgid "Site Header" -msgstr "站点标头" - -#: adminlteui/admin.py:60 -msgid "Text to put in base page's tag b." -msgstr "右上角文字标头,对应templates中的site_header标签。" - -#: adminlteui/admin.py:63 -msgid "Site Logo" -msgstr "站点logo" - -#: adminlteui/admin.py:67 -msgid "Transparent background picture is a good choice." -msgstr "透明背景的图片更适合。" - -#: adminlteui/admin.py:69 -msgid "Welcome Sign" -msgstr "欢迎标语" - -#: adminlteui/admin.py:71 -msgid "Login page welcome sign." -msgstr "登录页面欢迎标语" - -#: adminlteui/admin.py:74 -msgid "Avatar Field" -msgstr "头像字段" - -#: adminlteui/admin.py:78 -msgid "which field is avatar." -msgstr "用户表中头像对应的字段" - -#: adminlteui/admin.py:80 -msgid "Show Avatar" -msgstr "显示头像" - -#: adminlteui/admin.py:107 adminlteui/admin.py:125 -msgid "site_logo depends on setting.MEDIA_URL and setting.MEDIA_ROOT." -msgstr "site_logo依赖于setting.MEDIA_URL和setting.MEDIA_ROOT。" - -#: adminlteui/admin.py:218 -msgid "General Option Saved." -msgstr "基本设置保存成功。" - -#: adminlteui/admin.py:221 -msgid "General Option Save Failed." -msgstr "基本设置保存失败。" - -#: adminlteui/admin.py:250 adminlteui/admin.py:336 adminlteui/models.py:52 -msgid "ContentType" -msgstr "关联Model" +#: .\adminlteui\apps.py:12 +msgid "AdminLteUI" +msgstr "" -#: adminlteui/admin.py:260 adminlteui/admin.py:263 +#: .\adminlteui\filters.py:48 #, python-format -msgid "Exception raised while add node: %s" -msgstr "在添加菜单时,发生异常:%s" - -#: adminlteui/admin.py:293 -msgid "Menu exchanged, current is `custom menu`." -msgstr "菜单切换成功,当前为`自定义菜单`" - -#: adminlteui/admin.py:299 -msgid "Menu exchanged, current is `system menu`." -msgstr "菜单切换成功,当前为`系统菜单`" - -#: adminlteui/admin.py:320 adminlteui/models.py:43 -msgid "Link" -msgstr "链接" - -#: adminlteui/admin.py:328 adminlteui/models.py:49 -msgid "Icon" -msgstr "图标" - -#: adminlteui/apps.py:12 adminlteui/templates/adminlte/general_option.html:13 -msgid "AdminSettings" -msgstr "设置" - -#: adminlteui/models.py:14 -msgid "Option Name" -msgstr "名称" - -#: adminlteui/models.py:16 -msgid "Option Value" -msgstr "值" - -#: adminlteui/models.py:17 adminlteui/models.py:59 -msgid "Valid" -msgstr "有效性" - -#: adminlteui/models.py:19 -msgid "CreateTime" -msgstr "创建时间" - -#: adminlteui/models.py:21 -msgid "UpdateTime" -msgstr "更新时间" - -#: adminlteui/models.py:27 -msgid "Options" -msgstr "选项" - -#: adminlteui/models.py:28 -msgid "All Options" -msgstr "所有选项" +msgid "Invalid date for '%(field_name)s' field range filter" +msgstr "'%(field_name)s' 传递了非法的时间格式" -#: adminlteui/models.py:33 -msgid "Internal" -msgstr "内部" - -#: adminlteui/models.py:34 -msgid "External" -msgstr "外部" - -#: adminlteui/models.py:35 -msgid "Divide" -msgstr "链接分组" - -#: adminlteui/models.py:37 -#, fuzzy -#| msgid "username" -msgid "name" -msgstr "用户名" - -#: adminlteui/models.py:39 -msgid "Menu Position" -msgstr "菜单位置" - -#: adminlteui/models.py:41 -msgid "Link Type" -msgstr "链接类型" - -#: adminlteui/models.py:45 -msgid "support admin:index or /admin/ or http://" -msgstr "支持 admin:index 或 /admin/ 或 http://" - -#: adminlteui/models.py:55 -msgid "use for permission control." -msgstr "用于权限控制。" - -#: adminlteui/models.py:57 -msgid "Priority Level" -msgstr "优先级" - -#: adminlteui/models.py:58 -msgid "The bigger the priority" -msgstr "越大越优先" - -#: adminlteui/models.py:71 -msgid "max depth is 2." -msgstr "菜单最大深度为2" - -#: adminlteui/models.py:78 -msgid "Menu" -msgstr "菜单" - -#: adminlteui/models.py:79 -msgid "Menu Setting" -msgstr "菜单设置" - -#: adminlteui/templates/admin/404.html:4 adminlteui/templates/admin/404.html:6 +#: .\adminlteui\templates\admin\404.html:4 +#: .\adminlteui\templates\admin\404.html:6 msgid "Page not found" msgstr "" -#: adminlteui/templates/admin/404.html:10 +#: .\adminlteui\templates\admin\404.html:10 msgid "We're sorry, but the requested page could not be found." msgstr "" -#: adminlteui/templates/admin/500.html:7 -#: adminlteui/templates/admin/auth/user/change_password.html:18 -#: adminlteui/templates/admin/change_form.html:21 -#: adminlteui/templates/admin/change_list.html:28 -#: adminlteui/templates/admin/delete_confirmation.html:14 -#: adminlteui/templates/admin/delete_selected_confirmation.html:14 -#: adminlteui/templates/admin/index.html:14 -#: adminlteui/templates/admin/invalid_setup.html:6 -#: adminlteui/templates/admin/object_history.html:11 -#: adminlteui/templates/adminlte/general_option.html:12 -#: adminlteui/templates/registration/password_change_done.html:6 -#: adminlteui/templates/registration/password_change_form.html:11 +#: .\adminlteui\templates\admin\500.html:7 +#: .\adminlteui\templates\admin\auth\user\change_password.html:18 +#: .\adminlteui\templates\admin\change_form.html:21 +#: .\adminlteui\templates\admin\change_list.html:28 +#: .\adminlteui\templates\admin\delete_confirmation.html:14 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:14 +#: .\adminlteui\templates\admin\index.html:14 +#: .\adminlteui\templates\admin\invalid_setup.html:6 +#: .\adminlteui\templates\admin\object_history.html:10 +#: .\adminlteui\templates\registration\password_change_done.html:6 +#: .\adminlteui\templates\registration\password_change_form.html:11 msgid "Home" msgstr "" -#: adminlteui/templates/admin/500.html:8 +#: .\adminlteui\templates\admin\500.html:8 msgid "Server error" msgstr "" -#: adminlteui/templates/admin/500.html:12 +#: .\adminlteui\templates\admin\500.html:12 msgid "Server error (500)" msgstr "" -#: adminlteui/templates/admin/500.html:14 +#: .\adminlteui\templates\admin\500.html:14 msgid "Server Error (500)" msgstr "" -#: adminlteui/templates/admin/500.html:18 +#: .\adminlteui\templates\admin\500.html:18 msgid "" "There's been an error. It's been reported to the site administrators via " "email and should be fixed shortly. Thanks for your patience." msgstr "" -#: adminlteui/templates/admin/actions.html:10 +#: .\adminlteui\templates\admin\actions.html:10 msgid "Run the selected action" msgstr "" -#: adminlteui/templates/admin/actions.html:10 +#: .\adminlteui\templates\admin\actions.html:10 msgid "Go" msgstr "" -#: adminlteui/templates/admin/actions.html:18 +#: .\adminlteui\templates\admin\actions.html:18 msgid "Click here to select the objects across all pages" msgstr "" -#: adminlteui/templates/admin/actions.html:18 +#: .\adminlteui\templates\admin\actions.html:18 #, python-format msgid "Select all %(total_count)s %(module_name)s" msgstr "" -#: adminlteui/templates/admin/actions.html:20 +#: .\adminlteui\templates\admin\actions.html:20 msgid "Clear selection" msgstr "" -#: adminlteui/templates/admin/auth/user/add_form.html:6 +#: .\adminlteui\templates\admin\auth\user\add_form.html:6 msgid "" "First, enter a username and password. Then, you'll be able to edit more user " "options." msgstr "" -#: adminlteui/templates/admin/auth/user/add_form.html:8 +#: .\adminlteui\templates\admin\auth\user\add_form.html:8 msgid "Enter a username and password." msgstr "" -#: adminlteui/templates/admin/auth/user/change_password.html:22 -#: adminlteui/templates/admin/auth/user/change_password.html:27 -#: adminlteui/templates/admin/auth/user/change_password.html:94 -#: adminlteui/templates/admin/base.html:182 -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 -#: adminlteui/templates/registration/password_change_form.html:102 +#: .\adminlteui\templates\admin\auth\user\change_password.html:22 +#: .\adminlteui\templates\admin\auth\user\change_password.html:27 +#: .\adminlteui\templates\admin\auth\user\change_password.html:94 +#: .\adminlteui\templates\admin\base.html:161 +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 +#: .\adminlteui\templates\registration\password_change_form.html:102 msgid "Change password" msgstr "" -#: adminlteui/templates/admin/auth/user/change_password.html:36 +#: .\adminlteui\templates\admin\auth\user\change_password.html:36 #, python-format msgid "Enter a new password for the user %(username)s." msgstr "" -#: adminlteui/templates/admin/auth/user/change_password.html:48 -#: adminlteui/templates/admin/change_form.html:53 -#: adminlteui/templates/admin/change_list.html:55 -#: adminlteui/templates/registration/password_change_form.html:37 +#: .\adminlteui\templates\admin\auth\user\change_password.html:48 +#: .\adminlteui\templates\admin\change_form.html:52 +#: .\adminlteui\templates\admin\change_list.html:55 +#: .\adminlteui\templates\registration\password_change_form.html:37 msgid "Please correct the error below." msgstr "" -#: adminlteui/templates/admin/auth/user/change_password.html:48 -#: adminlteui/templates/admin/change_form.html:53 -#: adminlteui/templates/admin/change_list.html:55 -#: adminlteui/templates/registration/password_change_form.html:37 +#: .\adminlteui\templates\admin\auth\user\change_password.html:48 +#: .\adminlteui\templates\admin\change_form.html:52 +#: .\adminlteui\templates\admin\change_list.html:55 +#: .\adminlteui\templates\registration\password_change_form.html:37 msgid "Please correct the errors below." msgstr "" -#: adminlteui/templates/admin/base.html:135 -#: adminlteui/templates/admin/base.html:151 +#: .\adminlteui\templates\admin\base.html:130 +#: .\adminlteui\templates\admin\base.html:146 msgid "Super manager" msgstr "超级管理员" -#: adminlteui/templates/admin/base.html:140 -#: adminlteui/templates/admin/base.html:156 +#: .\adminlteui\templates\admin\base.html:135 +#: .\adminlteui\templates\admin\base.html:151 msgid "Normal" msgstr "普通用户" -#: adminlteui/templates/admin/base.html:143 -#: adminlteui/templates/admin/base.html:159 +#: .\adminlteui\templates\admin\base.html:138 +#: .\adminlteui\templates\admin\base.html:154 msgid "Register time" msgstr "注册时间" -#: adminlteui/templates/admin/base.html:185 -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 +#: .\adminlteui\templates\admin\base.html:164 +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 msgid "Log out" msgstr "" -#: adminlteui/templates/admin/base.html:218 +#: .\adminlteui\templates\admin\base.html:195 msgid "Online" msgstr "在线" -#: adminlteui/templates/admin/base.html:226 -#: adminlteui/templates/admin/search_form.html:20 +#: .\adminlteui\templates\admin\base.html:203 +#: .\adminlteui\templates\admin\search_form.html:20 msgid "Search" msgstr "搜索" -#: adminlteui/templates/admin/base.html:238 +#: .\adminlteui\templates\admin\base.html:215 msgid "MAIN NAVIGATION" msgstr "页面导航" -#: adminlteui/templates/admin/base.html:241 +#: .\adminlteui\templates\admin\base.html:218 msgid "Dashboard" msgstr "仪表盘" -#: adminlteui/templates/admin/base_site.html:8 -#: adminlteui/templates/admin/login.html:13 -#: adminlteui/templates/adminlte/general_option.html:23 -#: adminlteui/templates/registration/logged_out.html:13 +#: .\adminlteui\templates\admin\base_site.html:4 +#: .\adminlteui\templates\admin\login.html:10 +#: .\adminlteui\templates\registration\logged_out.html:10 msgid "Django site admin" msgstr "" -#: adminlteui/templates/admin/change_form.html:24 +#: .\adminlteui\templates\admin\change_form.html:24 #, python-format msgid "Add %(name)s" msgstr "" -#: adminlteui/templates/admin/change_form.html:100 +#: .\adminlteui\templates\admin\change_form.html:99 msgid "change form tools" msgstr "操作面板" -#: adminlteui/templates/admin/change_list_object_tools.html:7 +#: .\adminlteui\templates\admin\change_list_object_tools.html:7 #, python-format msgid "   Add %(name)s" msgstr "   增加 %(name)s" -#: adminlteui/templates/admin/delete_confirmation.html:18 -#: adminlteui/templates/admin/delete_confirmation.html:22 -#: adminlteui/templates/admin/delete_confirmation.html:32 -#: adminlteui/templates/admin/submit_line.html:13 +#: .\adminlteui\templates\admin\delete_confirmation.html:18 +#: .\adminlteui\templates\admin\delete_confirmation.html:22 +#: .\adminlteui\templates\admin\delete_confirmation.html:32 +#: .\adminlteui\templates\admin\submit_line.html:13 msgid "Delete" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:39 +#: .\adminlteui\templates\admin\delete_confirmation.html:39 #, python-format msgid "" "Deleting the %(object_name)s '%(escaped_object)s' would result in deleting " @@ -359,42 +201,42 @@ msgid "" "following types of objects:" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:46 +#: .\adminlteui\templates\admin\delete_confirmation.html:46 #, python-format msgid "" "Deleting the %(object_name)s '%(escaped_object)s' would require deleting the " "following protected related objects:" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:53 +#: .\adminlteui\templates\admin\delete_confirmation.html:53 #, python-format msgid "" "Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? " "All of the following related items will be deleted:" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:55 -#: adminlteui/templates/admin/delete_selected_confirmation.html:53 +#: .\adminlteui\templates\admin\delete_confirmation.html:55 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:53 msgid "Objects" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:62 -#: adminlteui/templates/admin/delete_selected_confirmation.html:64 +#: .\adminlteui\templates\admin\delete_confirmation.html:62 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:64 msgid "Yes, I'm sure" msgstr "" -#: adminlteui/templates/admin/delete_confirmation.html:63 -#: adminlteui/templates/admin/delete_selected_confirmation.html:65 +#: .\adminlteui\templates\admin\delete_confirmation.html:63 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:65 msgid "No, take me back" msgstr "" -#: adminlteui/templates/admin/delete_selected_confirmation.html:17 -#: adminlteui/templates/admin/delete_selected_confirmation.html:21 -#: adminlteui/templates/admin/delete_selected_confirmation.html:30 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:17 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:21 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:30 msgid "Delete multiple objects" msgstr "" -#: adminlteui/templates/admin/delete_selected_confirmation.html:37 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:37 #, python-format msgid "" "Deleting the selected %(objects_name)s would result in deleting related " @@ -402,246 +244,258 @@ msgid "" "types of objects:" msgstr "" -#: adminlteui/templates/admin/delete_selected_confirmation.html:44 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:44 #, python-format msgid "" "Deleting the selected %(objects_name)s would require deleting the following " "protected related objects:" msgstr "" -#: adminlteui/templates/admin/delete_selected_confirmation.html:51 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:51 #, python-format msgid "" "Are you sure you want to delete the selected %(objects_name)s? All of the " "following objects and their related items will be deleted:" msgstr "" -#: adminlteui/templates/admin/edit_inline/stacked.html:18 -#: adminlteui/templates/admin/edit_inline/tabular.html:38 -#: adminlteui/templates/admin/index.html:47 +#: .\adminlteui\templates\admin\edit_inline\stacked.html:18 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:38 +#: .\adminlteui\templates\admin\index.html:47 msgid "Change" msgstr "" -#: adminlteui/templates/admin/edit_inline/stacked.html:18 -#: adminlteui/templates/admin/edit_inline/tabular.html:38 -#: adminlteui/templates/admin/index.html:45 +#: .\adminlteui\templates\admin\edit_inline\stacked.html:18 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:38 +#: .\adminlteui\templates\admin\index.html:45 msgid "View" msgstr "" -#: adminlteui/templates/admin/edit_inline/stacked.html:20 -#: adminlteui/templates/admin/edit_inline/tabular.html:40 +#: .\adminlteui\templates\admin\edit_inline\stacked.html:20 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:40 msgid "View on site" msgstr "" -#: adminlteui/templates/admin/edit_inline/tabular.html:24 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:24 msgid "Delete?" msgstr "" -#: adminlteui/templates/admin/includes/object_delete_summary.html:2 +#: .\adminlteui\templates\admin\includes\object_delete_summary.html:2 msgid "Summary" msgstr "" -#: adminlteui/templates/admin/index.html:10 -#: adminlteui/templates/admin/index.html:15 +#: .\adminlteui\templates\admin\index.html:10 +#: .\adminlteui\templates\admin\index.html:15 msgid "dashboard" msgstr "仪表盘" -#: adminlteui/templates/admin/index.html:39 +#: .\adminlteui\templates\admin\index.html:39 msgid "Add" msgstr "" -#: adminlteui/templates/admin/index.html:69 +#: .\adminlteui\templates\admin\index.html:69 msgid "My Applications" msgstr "我的应用" -#: adminlteui/templates/admin/index.html:83 +#: .\adminlteui\templates\admin\index.html:83 msgid "My tables" msgstr "我的表格" -#: adminlteui/templates/admin/index.html:125 +#: .\adminlteui\templates\admin\index.html:125 msgid "Recent actions" msgstr "" -#: adminlteui/templates/admin/index.html:126 +#: .\adminlteui\templates\admin\index.html:126 msgid "My actions" msgstr "" -#: adminlteui/templates/admin/index.html:130 +#: .\adminlteui\templates\admin\index.html:130 msgid "None available" msgstr "" -#: adminlteui/templates/admin/index.html:146 +#: .\adminlteui\templates\admin\index.html:146 msgid "Unknown content" msgstr "" -#: adminlteui/templates/admin/index.html:164 +#: .\adminlteui\templates\admin\index.html:164 msgid "You don't have permission to view or edit anything." msgstr "" -#: adminlteui/templates/admin/invalid_setup.html:14 +#: .\adminlteui\templates\admin\invalid_setup.html:14 msgid "" "Something's wrong with your database installation. Make sure the appropriate " "database tables have been created, and make sure the database is readable by " "the appropriate user." msgstr "" -#: adminlteui/templates/admin/login.html:15 -#: adminlteui/templates/admin/login.html:90 +#: .\adminlteui\templates\admin\login.html:10 +#: .\adminlteui\templates\admin\login.html:79 msgid "Log in" msgstr "登录" -#: adminlteui/templates/admin/login.html:60 -#: adminlteui/templates/registration/logged_out.html:58 +#: .\adminlteui\templates\admin\login.html:49 +#: .\adminlteui\templates\registration\logged_out.html:47 msgid "Login and Enjoy" msgstr "芝麻开门" -#: adminlteui/templates/admin/login.html:73 +#: .\adminlteui\templates\admin\login.html:62 msgid "username" msgstr "用户名" -#: adminlteui/templates/admin/login.html:77 +#: .\adminlteui\templates\admin\login.html:66 msgid "password" msgstr "密码" -#: adminlteui/templates/admin/login.html:84 +#: .\adminlteui\templates\admin\login.html:73 msgid "Remember me" msgstr "记住我" -#: adminlteui/templates/admin/login.html:97 +#: .\adminlteui\templates\admin\login.html:86 msgid "Other" msgstr "更多" -#: adminlteui/templates/admin/login.html:98 +#: .\adminlteui\templates\admin\login.html:87 msgid "Sign in using Facebook" msgstr "" -#: adminlteui/templates/admin/login.html:99 +#: .\adminlteui\templates\admin\login.html:88 msgid "Sign in using Google+" msgstr "" -#: adminlteui/templates/admin/object_history.html:15 -#: adminlteui/templates/admin/object_history.html:19 -#: adminlteui/templates/admin/object_history.html:28 +#: .\adminlteui\templates\admin\object_history.html:14 +#: .\adminlteui\templates\admin\object_history.html:18 +#: .\adminlteui\templates\admin\object_history.html:27 msgid "History" msgstr "" -#: adminlteui/templates/admin/object_history.html:39 +#: .\adminlteui\templates\admin\object_history.html:38 msgid "Date/time" msgstr "" -#: adminlteui/templates/admin/object_history.html:40 +#: .\adminlteui\templates\admin\object_history.html:39 msgid "User" msgstr "" -#: adminlteui/templates/admin/object_history.html:41 +#: .\adminlteui\templates\admin\object_history.html:40 msgid "Action" msgstr "" -#: adminlteui/templates/admin/object_history.html:55 +#: .\adminlteui\templates\admin\object_history.html:54 msgid "" "This object doesn't have a change history. It probably wasn't added via this " "admin site." msgstr "" -#: adminlteui/templates/admin/pagination.html:14 -#: adminlteui/templates/admin/search_form.html:22 +#: .\adminlteui\templates\admin\pagination.html:15 +#: .\adminlteui\templates\admin\search_form.html:22 msgid "Show all" msgstr "" -#: adminlteui/templates/admin/pagination.html:17 -#: adminlteui/templates/admin/submit_line.html:5 -#: adminlteui/templates/adminlte/general_option.html:47 +#: .\adminlteui\templates\admin\pagination.html:18 +#: .\adminlteui\templates\admin\submit_line.html:5 msgid "Save" msgstr "保存" -#: adminlteui/templates/admin/pagination.html:29 +#: .\adminlteui\templates\admin\pagination.html:30 msgid "Previous" msgstr "上一页" -#: adminlteui/templates/admin/pagination.html:37 +#: .\adminlteui\templates\admin\pagination.html:38 msgid "Next" msgstr "下一页" -#: adminlteui/templates/admin/search_form.html:22 +#: .\adminlteui\templates\admin\search_form.html:22 #, python-format msgid "%(counter)s result" msgid_plural "%(counter)s results" msgstr[0] "" msgstr[1] "" -#: adminlteui/templates/admin/search_form.html:22 +#: .\adminlteui\templates\admin\search_form.html:22 #, python-format msgid "%(full_result_count)s total" msgstr "" -#: adminlteui/templates/admin/submit_line.html:19 +#: .\adminlteui\templates\admin\submit_line.html:19 msgid "Save as new" msgstr "" -#: adminlteui/templates/admin/submit_line.html:25 +#: .\adminlteui\templates\admin\submit_line.html:25 msgid "Save and add another" msgstr "" -#: adminlteui/templates/admin/submit_line.html:33 +#: .\adminlteui\templates\admin\submit_line.html:33 msgid "Save and continue editing" msgstr "" -#: adminlteui/templates/admin/submit_line.html:33 +#: .\adminlteui\templates\admin\submit_line.html:33 msgid "Save and view" msgstr "" -#: adminlteui/templates/admin/submit_line.html:39 +#: .\adminlteui\templates\admin\submit_line.html:39 msgid "Close" msgstr "" -#: adminlteui/templates/adminlte/general_option.html:14 -#: adminlteui/templates/adminlte/general_option.html:18 -#: adminlteui/templates/adminlte/general_option.html:27 -#: adminlteui/templates/adminlte/general_option.html:36 -msgid "General Option" -msgstr "基本设置" +#: .\adminlteui\templates\adminlte\date_range_filter.html:24 +msgid "Apply" +msgstr "确定" -#: adminlteui/templates/adminlte/menu_change_list.html:16 -msgid "Exchange Menu" -msgstr "菜单切换" +#: .\adminlteui\templates\adminlte\date_range_filter.html:25 +msgid "Cancel" +msgstr "取消" -#: adminlteui/templates/registration/logged_out.html:15 -#: adminlteui/templates/registration/logged_out.html:63 -#, fuzzy -#| msgid "Log in" +#: .\adminlteui\templates\adminlte\date_range_filter.html:26 +msgid "Custom Range" +msgstr "自定义范围" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:29 +msgid "Today" +msgstr "今天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:30 +msgid "Yesterday" +msgstr "昨天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:31 +msgid "Last 7 Days" +msgstr "近7天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:32 +msgid "Last 30 Days" +msgstr "近30天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:33 +msgid "This Month" +msgstr "本月" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:34 +msgid "Last Month" +msgstr "上月" + +#: .\adminlteui\templates\registration\logged_out.html:10 +#: .\adminlteui\templates\registration\logged_out.html:52 msgid "Log in again" msgstr "登录" -#: adminlteui/templates/registration/logged_out.html:61 +#: .\adminlteui\templates\registration\logged_out.html:50 msgid "Thanks for spending some quality time with the Web site today." msgstr "" -#: adminlteui/templates/registration/password_change_done.html:3 -#: adminlteui/templates/registration/password_change_form.html:7 +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 msgid "Documentation" msgstr "" -#: adminlteui/templates/registration/password_change_done.html:7 -#: adminlteui/templates/registration/password_change_form.html:12 -#, fuzzy -#| msgid "password" +#: .\adminlteui\templates\registration\password_change_done.html:7 +#: .\adminlteui\templates\registration\password_change_form.html:12 msgid "Password change" msgstr "密码" -#: adminlteui/templates/registration/password_change_done.html:14 +#: .\adminlteui\templates\registration\password_change_done.html:14 msgid "Your password was changed." msgstr "" -#: adminlteui/templates/registration/password_change_form.html:27 +#: .\adminlteui\templates\registration\password_change_form.html:27 msgid "" -"Please enter your old password, for security's sake, and then enter your new " +"Please enter your old password, for security’s sake, and then enter your new " "password twice so we can verify you typed it in correctly." msgstr "" - -#: adminlteui/templatetags/adminlte_list.py:172 -msgid "Return to ordered tree" -msgstr "" - -#: adminlteui/templatetags/adminlte_menu.py:147 -msgid "General Options" -msgstr "基本设置" diff --git a/adminlteui/locale/zh_Hans/LC_MESSAGES/django.mo b/adminlteui/locale/zh_Hans/LC_MESSAGES/django.mo new file mode 100644 index 0000000..597b317 Binary files /dev/null and b/adminlteui/locale/zh_Hans/LC_MESSAGES/django.mo differ diff --git a/adminlteui/locale/zh_Hans/LC_MESSAGES/django.po b/adminlteui/locale/zh_Hans/LC_MESSAGES/django.po new file mode 100644 index 0000000..5d5c457 --- /dev/null +++ b/adminlteui/locale/zh_Hans/LC_MESSAGES/django.po @@ -0,0 +1,501 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-07-04 11:57+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: .\adminlteui\apps.py:12 +msgid "AdminLteUI" +msgstr "" + +#: .\adminlteui\filters.py:48 +#, python-format +msgid "Invalid date for '%(field_name)s' field range filter" +msgstr "'%(field_name)s' 传递了非法的时间格式" + +#: .\adminlteui\templates\admin\404.html:4 +#: .\adminlteui\templates\admin\404.html:6 +msgid "Page not found" +msgstr "" + +#: .\adminlteui\templates\admin\404.html:10 +msgid "We're sorry, but the requested page could not be found." +msgstr "" + +#: .\adminlteui\templates\admin\500.html:7 +#: .\adminlteui\templates\admin\auth\user\change_password.html:18 +#: .\adminlteui\templates\admin\change_form.html:21 +#: .\adminlteui\templates\admin\change_list.html:28 +#: .\adminlteui\templates\admin\delete_confirmation.html:14 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:14 +#: .\adminlteui\templates\admin\index.html:14 +#: .\adminlteui\templates\admin\invalid_setup.html:6 +#: .\adminlteui\templates\admin\object_history.html:10 +#: .\adminlteui\templates\registration\password_change_done.html:6 +#: .\adminlteui\templates\registration\password_change_form.html:11 +msgid "Home" +msgstr "" + +#: .\adminlteui\templates\admin\500.html:8 +msgid "Server error" +msgstr "" + +#: .\adminlteui\templates\admin\500.html:12 +msgid "Server error (500)" +msgstr "" + +#: .\adminlteui\templates\admin\500.html:14 +msgid "Server Error (500)" +msgstr "" + +#: .\adminlteui\templates\admin\500.html:18 +msgid "" +"There's been an error. It's been reported to the site administrators via " +"email and should be fixed shortly. Thanks for your patience." +msgstr "" + +#: .\adminlteui\templates\admin\actions.html:10 +msgid "Run the selected action" +msgstr "" + +#: .\adminlteui\templates\admin\actions.html:10 +msgid "Go" +msgstr "" + +#: .\adminlteui\templates\admin\actions.html:18 +msgid "Click here to select the objects across all pages" +msgstr "" + +#: .\adminlteui\templates\admin\actions.html:18 +#, python-format +msgid "Select all %(total_count)s %(module_name)s" +msgstr "" + +#: .\adminlteui\templates\admin\actions.html:20 +msgid "Clear selection" +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\add_form.html:6 +msgid "" +"First, enter a username and password. Then, you'll be able to edit more user " +"options." +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\add_form.html:8 +msgid "Enter a username and password." +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\change_password.html:22 +#: .\adminlteui\templates\admin\auth\user\change_password.html:27 +#: .\adminlteui\templates\admin\auth\user\change_password.html:94 +#: .\adminlteui\templates\admin\base.html:161 +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 +#: .\adminlteui\templates\registration\password_change_form.html:102 +msgid "Change password" +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\change_password.html:36 +#, python-format +msgid "Enter a new password for the user %(username)s." +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\change_password.html:48 +#: .\adminlteui\templates\admin\change_form.html:52 +#: .\adminlteui\templates\admin\change_list.html:55 +#: .\adminlteui\templates\registration\password_change_form.html:37 +msgid "Please correct the error below." +msgstr "" + +#: .\adminlteui\templates\admin\auth\user\change_password.html:48 +#: .\adminlteui\templates\admin\change_form.html:52 +#: .\adminlteui\templates\admin\change_list.html:55 +#: .\adminlteui\templates\registration\password_change_form.html:37 +msgid "Please correct the errors below." +msgstr "" + +#: .\adminlteui\templates\admin\base.html:130 +#: .\adminlteui\templates\admin\base.html:146 +msgid "Super manager" +msgstr "超级管理员" + +#: .\adminlteui\templates\admin\base.html:135 +#: .\adminlteui\templates\admin\base.html:151 +msgid "Normal" +msgstr "普通用户" + +#: .\adminlteui\templates\admin\base.html:138 +#: .\adminlteui\templates\admin\base.html:154 +msgid "Register time" +msgstr "注册时间" + +#: .\adminlteui\templates\admin\base.html:164 +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 +msgid "Log out" +msgstr "" + +#: .\adminlteui\templates\admin\base.html:195 +msgid "Online" +msgstr "在线" + +#: .\adminlteui\templates\admin\base.html:203 +#: .\adminlteui\templates\admin\search_form.html:20 +msgid "Search" +msgstr "搜索" + +#: .\adminlteui\templates\admin\base.html:215 +msgid "MAIN NAVIGATION" +msgstr "页面导航" + +#: .\adminlteui\templates\admin\base.html:218 +msgid "Dashboard" +msgstr "仪表盘" + +#: .\adminlteui\templates\admin\base_site.html:4 +#: .\adminlteui\templates\admin\login.html:10 +#: .\adminlteui\templates\registration\logged_out.html:10 +msgid "Django site admin" +msgstr "" + +#: .\adminlteui\templates\admin\change_form.html:24 +#, python-format +msgid "Add %(name)s" +msgstr "" + +#: .\adminlteui\templates\admin\change_form.html:99 +msgid "change form tools" +msgstr "操作面板" + +#: .\adminlteui\templates\admin\change_list_object_tools.html:7 +#, python-format +msgid "   Add %(name)s" +msgstr "   增加 %(name)s" + +#: .\adminlteui\templates\admin\delete_confirmation.html:18 +#: .\adminlteui\templates\admin\delete_confirmation.html:22 +#: .\adminlteui\templates\admin\delete_confirmation.html:32 +#: .\adminlteui\templates\admin\submit_line.html:13 +msgid "Delete" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:39 +#, python-format +msgid "" +"Deleting the %(object_name)s '%(escaped_object)s' would result in deleting " +"related objects, but your account doesn't have permission to delete the " +"following types of objects:" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:46 +#, python-format +msgid "" +"Deleting the %(object_name)s '%(escaped_object)s' would require deleting the " +"following protected related objects:" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:53 +#, python-format +msgid "" +"Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? " +"All of the following related items will be deleted:" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:55 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:53 +msgid "Objects" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:62 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:64 +msgid "Yes, I'm sure" +msgstr "" + +#: .\adminlteui\templates\admin\delete_confirmation.html:63 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:65 +msgid "No, take me back" +msgstr "" + +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:17 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:21 +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:30 +msgid "Delete multiple objects" +msgstr "" + +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:37 +#, python-format +msgid "" +"Deleting the selected %(objects_name)s would result in deleting related " +"objects, but your account doesn't have permission to delete the following " +"types of objects:" +msgstr "" + +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:44 +#, python-format +msgid "" +"Deleting the selected %(objects_name)s would require deleting the following " +"protected related objects:" +msgstr "" + +#: .\adminlteui\templates\admin\delete_selected_confirmation.html:51 +#, python-format +msgid "" +"Are you sure you want to delete the selected %(objects_name)s? All of the " +"following objects and their related items will be deleted:" +msgstr "" + +#: .\adminlteui\templates\admin\edit_inline\stacked.html:18 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:38 +#: .\adminlteui\templates\admin\index.html:47 +msgid "Change" +msgstr "" + +#: .\adminlteui\templates\admin\edit_inline\stacked.html:18 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:38 +#: .\adminlteui\templates\admin\index.html:45 +msgid "View" +msgstr "" + +#: .\adminlteui\templates\admin\edit_inline\stacked.html:20 +#: .\adminlteui\templates\admin\edit_inline\tabular.html:40 +msgid "View on site" +msgstr "" + +#: .\adminlteui\templates\admin\edit_inline\tabular.html:24 +msgid "Delete?" +msgstr "" + +#: .\adminlteui\templates\admin\includes\object_delete_summary.html:2 +msgid "Summary" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:10 +#: .\adminlteui\templates\admin\index.html:15 +msgid "dashboard" +msgstr "仪表盘" + +#: .\adminlteui\templates\admin\index.html:39 +msgid "Add" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:69 +msgid "My Applications" +msgstr "我的应用" + +#: .\adminlteui\templates\admin\index.html:83 +msgid "My tables" +msgstr "我的表格" + +#: .\adminlteui\templates\admin\index.html:125 +msgid "Recent actions" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:126 +msgid "My actions" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:130 +msgid "None available" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:146 +msgid "Unknown content" +msgstr "" + +#: .\adminlteui\templates\admin\index.html:164 +msgid "You don't have permission to view or edit anything." +msgstr "" + +#: .\adminlteui\templates\admin\invalid_setup.html:14 +msgid "" +"Something's wrong with your database installation. Make sure the appropriate " +"database tables have been created, and make sure the database is readable by " +"the appropriate user." +msgstr "" + +#: .\adminlteui\templates\admin\login.html:10 +#: .\adminlteui\templates\admin\login.html:79 +msgid "Log in" +msgstr "登录" + +#: .\adminlteui\templates\admin\login.html:49 +#: .\adminlteui\templates\registration\logged_out.html:47 +msgid "Login and Enjoy" +msgstr "芝麻开门" + +#: .\adminlteui\templates\admin\login.html:62 +msgid "username" +msgstr "用户名" + +#: .\adminlteui\templates\admin\login.html:66 +msgid "password" +msgstr "密码" + +#: .\adminlteui\templates\admin\login.html:73 +msgid "Remember me" +msgstr "记住我" + +#: .\adminlteui\templates\admin\login.html:86 +msgid "Other" +msgstr "更多" + +#: .\adminlteui\templates\admin\login.html:87 +msgid "Sign in using Facebook" +msgstr "" + +#: .\adminlteui\templates\admin\login.html:88 +msgid "Sign in using Google+" +msgstr "" + +#: .\adminlteui\templates\admin\object_history.html:14 +#: .\adminlteui\templates\admin\object_history.html:18 +#: .\adminlteui\templates\admin\object_history.html:27 +msgid "History" +msgstr "" + +#: .\adminlteui\templates\admin\object_history.html:38 +msgid "Date/time" +msgstr "" + +#: .\adminlteui\templates\admin\object_history.html:39 +msgid "User" +msgstr "" + +#: .\adminlteui\templates\admin\object_history.html:40 +msgid "Action" +msgstr "" + +#: .\adminlteui\templates\admin\object_history.html:54 +msgid "" +"This object doesn't have a change history. It probably wasn't added via this " +"admin site." +msgstr "" + +#: .\adminlteui\templates\admin\pagination.html:15 +#: .\adminlteui\templates\admin\search_form.html:22 +msgid "Show all" +msgstr "" + +#: .\adminlteui\templates\admin\pagination.html:18 +#: .\adminlteui\templates\admin\submit_line.html:5 +msgid "Save" +msgstr "保存" + +#: .\adminlteui\templates\admin\pagination.html:30 +msgid "Previous" +msgstr "上一页" + +#: .\adminlteui\templates\admin\pagination.html:38 +msgid "Next" +msgstr "下一页" + +#: .\adminlteui\templates\admin\search_form.html:22 +#, python-format +msgid "%(counter)s result" +msgid_plural "%(counter)s results" +msgstr[0] "" +msgstr[1] "" + +#: .\adminlteui\templates\admin\search_form.html:22 +#, python-format +msgid "%(full_result_count)s total" +msgstr "" + +#: .\adminlteui\templates\admin\submit_line.html:19 +msgid "Save as new" +msgstr "" + +#: .\adminlteui\templates\admin\submit_line.html:25 +msgid "Save and add another" +msgstr "" + +#: .\adminlteui\templates\admin\submit_line.html:33 +msgid "Save and continue editing" +msgstr "" + +#: .\adminlteui\templates\admin\submit_line.html:33 +msgid "Save and view" +msgstr "" + +#: .\adminlteui\templates\admin\submit_line.html:39 +msgid "Close" +msgstr "" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:24 +msgid "Apply" +msgstr "确定" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:25 +msgid "Cancel" +msgstr "取消" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:26 +msgid "Custom Range" +msgstr "自定义范围" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:29 +msgid "Today" +msgstr "今天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:30 +msgid "Yesterday" +msgstr "昨天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:31 +msgid "Last 7 Days" +msgstr "近7天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:32 +msgid "Last 30 Days" +msgstr "近30天" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:33 +msgid "This Month" +msgstr "本月" + +#: .\adminlteui\templates\adminlte\date_range_filter.html:34 +msgid "Last Month" +msgstr "上月" + +#: .\adminlteui\templates\registration\logged_out.html:10 +#: .\adminlteui\templates\registration\logged_out.html:52 +msgid "Log in again" +msgstr "登录" + +#: .\adminlteui\templates\registration\logged_out.html:50 +msgid "Thanks for spending some quality time with the Web site today." +msgstr "" + +#: .\adminlteui\templates\registration\password_change_done.html:3 +#: .\adminlteui\templates\registration\password_change_form.html:7 +msgid "Documentation" +msgstr "" + +#: .\adminlteui\templates\registration\password_change_done.html:7 +#: .\adminlteui\templates\registration\password_change_form.html:12 +msgid "Password change" +msgstr "密码" + +#: .\adminlteui\templates\registration\password_change_done.html:14 +msgid "Your password was changed." +msgstr "" + +#: .\adminlteui\templates\registration\password_change_form.html:27 +msgid "" +"Please enter your old password, for security’s sake, and then enter your new " +"password twice so we can verify you typed it in correctly." +msgstr "" diff --git a/adminlteui/static/admin/components/datatables.net-bs/.bower.json b/adminlteui/static/admin/components/datatables.net-bs/.bower.json deleted file mode 100644 index 23e1b84..0000000 --- a/adminlteui/static/admin/components/datatables.net-bs/.bower.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "datatables.net-bs", - "description": "DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)", - "main": [ - "js/dataTables.bootstrap.js", - "css/dataTables.bootstrap.css" - ], - "keywords": [ - "filter", - "sort", - "DataTables", - "jQuery", - "table", - "Bootstrap" - ], - "dependencies": { - "jquery": ">=1.7", - "datatables.net": ">=1.10.9" - }, - "moduleType": [ - "globals", - "amd", - "node" - ], - "ignore": [ - "composer.json", - "datatables.json", - "package.json" - ], - "authors": [ - { - "name": "SpryMedia Ltd", - "homepage": "https://datatables.net" - } - ], - "homepage": "https://datatables.net", - "license": "MIT", - "version": "2.1.1", - "_release": "2.1.1", - "_resolution": { - "type": "version", - "tag": "2.1.1", - "commit": "c9aedb3c531795574d69203688888a6c16e02265" - }, - "_source": "https://github.com/DataTables/Dist-DataTables-Bootstrap.git", - "_target": "^2.1.1", - "_originalSource": "datatables.net-bs" -} \ No newline at end of file diff --git a/adminlteui/static/admin/components/datatables.net-bs/License.txt b/adminlteui/static/admin/components/datatables.net-bs/License.txt deleted file mode 100644 index 379a7e7..0000000 --- a/adminlteui/static/admin/components/datatables.net-bs/License.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright SpryMedia Limited and other contributors -http://datatables.net - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/adminlteui/static/admin/components/datatables.net-bs/Readme.md b/adminlteui/static/admin/components/datatables.net-bs/Readme.md deleted file mode 100644 index 54acee4..0000000 --- a/adminlteui/static/admin/components/datatables.net-bs/Readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/) - -This package contains distribution files required to style [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/) with styling for [Bootstrap](http://getbootstrap.com/). - -DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples. - - -## Installation - -### Browser - -For inclusion of this library using a standard ` + diff --git a/adminlteui/templates/admin/base.html b/adminlteui/templates/admin/base.html index 5da7d5f..a4a70d8 100644 --- a/adminlteui/templates/admin/base.html +++ b/adminlteui/templates/admin/base.html @@ -19,6 +19,21 @@ {% block extrastyle %} {% endblock %} + + + + + + + + + + + + + {% block extrahead %} {% endblock %} @@ -420,76 +435,12 @@

Chat Settings

- - - - - - - - - - - - {% if adminlte.demo %} {% endif %} - + diff --git a/adminlteui/templatetags/adminlte_menu.py b/adminlteui/templatetags/adminlte_menu.py index d8d2bb6..5b135b7 100644 --- a/adminlteui/templatetags/adminlte_menu.py +++ b/adminlteui/templatetags/adminlte_menu.py @@ -30,22 +30,29 @@ def render_main_menu(menu): for menu_item in menu: child = menu_item.get('child', []) if child: + if menu_item.get('active') is True: + treeview_class = 'treeview active menu-open' + treeview_menu_class = 'treeview-menu menu-open' + else: + treeview_class = 'treeview' + treeview_menu_class = 'treeview-menu' menu_item_html = f''' -
  • +
  • {menu_item.get('name')} -
      +
        {render_main_menu(child)}
      ''' else: target_blank = '' if menu_item.get('target_blank') is False else 'target="_blank"' + flag = 'active' if menu_item.get('active') is True else '' menu_item_html = f''' -
    • {menu_item.get('name')}
    • +
    • {menu_item.get('name')}
    • ''' html += menu_item_html return html @@ -64,8 +71,9 @@ def render_top_menu(menu): for menu_item in menu: child = menu_item.get('child', []) if child: + flag = 'active' if menu_item.get('active') is True else '' menu_item_html = f''' -
    • {menu_item.get('name')}
    • +
    • {menu_item.get('name')}
    • ''' html += menu_item_html return html diff --git a/docs/assets/images/menu.png b/docs/assets/images/menu.png new file mode 100644 index 0000000..524c913 Binary files /dev/null and b/docs/assets/images/menu.png differ diff --git a/docs/assets/images/modeladmin.png b/docs/assets/images/modeladmin.png new file mode 100644 index 0000000..2944e7b Binary files /dev/null and b/docs/assets/images/modeladmin.png differ diff --git a/docs/en/guide.md b/docs/en/guide.md index 006e5f2..f875c9c 100644 --- a/docs/en/guide.md +++ b/docs/en/guide.md @@ -1,282 +1,149 @@ -# Guides - -## General Option - -dynamic setup your site base on table `django_admin_settings_options`. - -support options: - -- Site Title -- Site Header -- Site Logo -- Welcome Sign -- Avatar Field -- Show Avatar - -## Options - -this options in your db, named `django_admin_settings_options`, after do migrate. - -you can also add your custom option into this table, and use it by templatetags -`adminlte_options` with function `get_adminlte_option`. - -options table has a valid field to control your option work or not. - - -example: - -``` -# adminlte/general_option.html - -{% load adminlte_options %} - -# here my option_name is site_title, you can custom yourself. -{% get_adminlte_option 'site_title' as adminlte_site_title %} -{% if adminlte_site_title.valid %} -{{ adminlte_site_title.site_title }} -{% else %} -{{ site_title|default:_('Django site admin') }} -{% endif %} - +# Guide + +## Simple Example +inherit `adminlte.core.AdminlteConfig`,and add `ADMINLTE_CONFIG_CLASS` in django settings +### Inherit AdminlteConfig +```python title='adminlte_config.py' +# myserver/utils/adminlte_config.py +from adminlteui.core import AdminlteConfig + +class MyAdminlteConfig(AdminlteConfig): + skin = 'red' + welcome_sign = 'welcome to xxx backend system' + ... ``` +### Settings in django +```python title='settings.py' +ADMINLTE_CONFIG_CLASS = 'myserver.utils.adminlte_config.MyAdminlteConfig' +``` + +## Params +### Basic Info +#### show_avatar +show avatar or not,default is `False` +#### avatar_field +avatar field or url,default is `None`,will render as `adminlteui/static/admin/dist/img/default.jpg` +#### username_field +username fields,default is `None`,will render as `request.user.username` +#### site_logo +site logo,default is `None`,will render as `adminlteui/static/admin/dist/img/default-log.svg` +#### skin +site skin,default is `None`,will render as `blue` +#### sidebar_layout +sidebar layout,default is `fixed`,choices:['boxed', 'fixed'] +#### search_form +show search form or not,default is `True` +#### copyright +copyright,default is `None`,will render as django-adminlte-ui version +#### welcome_sign +welcome sign(login page),default is `None`,will render as 'Login and Enjoy' +### Menu +Menu inherit `adminlte.core.MenuItem`,you can modify the left menu and top menu + +MenuItem has three type of `menu_type` + +- group:Group,you can make two or more MenuItem(`model` or `link`) in side the same menu level +- model:bind model which registered in admin by label,label like `app_label.modelName` +- link:normal link type,setup url direct + +example +```python title='adminlte_config.py' +from adminlte.core import MenuItem + +class MyAdminlteConfig(AdminlteConfig): + main_menu = [ + MenuItem(label='rpa', name='RPA服务', child=[ + MenuItem(label='rpa.Collector', menu_type='model'), + MenuItem(label='third', name='三级菜单', child=[ + MenuItem(label='github', name='Github', url='https://github.com/wuyue92tree', target_blank=True, menu_type='link'), + ]), + ]), + MenuItem(label='auth', name='认证和授权', icon='fa-users', child=[ + MenuItem(label='auth.User', name='用户', menu_type='model'), # (1) + MenuItem(label='auth.Group', name='组', menu_type='model'), + MenuItem(label='auth.link', name='/admin/auth/', menu_type='link', permissions=['auth.view_user']), # (2) + ]), + ] + top_menu = [ + MenuItem(label='outside_link', name='外部资源', child=[ + MenuItem(label='github', name='Github', url='https://github.com/wuyue92tree', target_blank=True, menu_type='link'), + ]), + MenuItem(label='rpa.Collector', menu_type='model'), + ] +``` + +effect + +![menu](../assets/images/menu.png) + +1. when menu_type is model,if name not setup, will show the model verbose_name +2. when menu_type is link, you can control menu show or not show by bind model permission, `permissions` default None, will not check permission + +#### main_menu +main menu(left menu),default is `[]`,will render as all registered model in admin +> Tips: Support multilevel menu +#### top_menu +top menu,default is `[]`,will show nothing +> Tips: Top menu will not show icon,only support secondary menu max -before custom option, you should known what adminlte has used. +## ModelAdmin +external ModelAdmin in django -- site_title -- site_header -- site_logo -- welcome_sign -- USE_CUSTOM_MENU -- avatar_field -- show_avatar +- make table filter support `select2` in `change_list` page +- custom search field placeholder for `change_list` page -## ModelAdmin -- make change_list filter support select2 -- custom placeholder for search_fields +example +```python title='admin.py' +from adminlte.admin import ModelAdmin -```python -# adminlte/admin.py -class ModelAdmin(admin.ModelAdmin): - select2_list_filter = () - search_field_placeholder = '' +class CollectorModelAdmin(ModelAdmin): + select2_list_filter = ('project', 'source') # (1) + search_field_placeholder = '描述/起始URL' # (2) + ... +``` - class Media: - css = { - "all": ("admin/components/select2/dist/css/select2.min.css",) - } - js = ( - "admin/components/select2/dist/js/select2.min.js", - ) +1. add field in to this tuple which need select2 filter +2. setup placeholder for search field - def changelist_view(self, request, extra_context=None): - view = super().changelist_view(request, extra_context) - cl = view.context_data.get('cl') - cl.search_field_placeholder = self.search_field_placeholder - filter_specs = cl.filter_specs +effect - for index, filter_spec in enumerate(filter_specs): - if filter_spec.field_path in self.select2_list_filter: - # flag to use select2 - filter_spec.display_select2 = True - cl.filter_specs[index] = filter_spec - view.context_data['cl'] = cl - return view -``` +![modeladmin](../assets/images/modeladmin.png) ## Widgets ### AdminlteSelect -> Since v1.5.0b0, you don't need modify new template to active select2. +> Since v1.5.0b0, you don't need to modify new template to active select2. example: -``` -# adminlte/admin.py -@admin.register(Menu) -class MenuAdmin(TreeAdmin): +```python title='rpa/admin.py' +@admin.register(Collector) +class CollectorAdmin(admin.ModelAdmin): ... - # change_form_template = 'adminlte/menu_change_form.html' formfield_overrides = { models.ForeignKey: {'widget': AdminlteSelect} } - -# adminlte/menu_change_form.html -# active the target select -# {% extends 'admin/change_form.html' %} - -# {% block extrajs %} -# {{ block.super }} -# -# {% endblock %} ``` effect: -![adminlte_select](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/adminlte_select.png?raw=true) +![adminlte_select](../assets/images/adminlte_select.png) ### AdminlteSelectMultiple -> Since v1.5.0b0, you don't need modify new template to active select2. +> Since v1.5.0b0, you don't need to modify new template to active select2. example: -``` -# adminlte/admin.py -@admin.register(Menu) -class MenuAdmin(TreeAdmin): +```python title='rpa/admin.py' +@admin.register(Collector) +class CollectorAdmin(admin.ModelAdmin): ... - # change_form_template = 'adminlte/menu_change_form.html' formfield_overrides = { # multiple for ManayToManyField models.ManayToManyField: {'widget': AdminlteSelectMultiple( attr={'style': 'width: 100%'} )} } - -# adminlte/menu_change_form.html -# active the target select -# {% extends 'admin/change_form.html' %} - -# {% block extrajs %} -# {{ block.super }} -# -# {% endblock %} ``` effect: -![adminlte_select](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/adminlte_select_multiple.png?raw=true) - - - -## Menu - -Custom your menu depends on database && treebeard. - -`depth 2` only, more will not effective now. - -### Menu Setting - -Exchange Menu by click the `Exchange Menu` button - -![menu list](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/menu-list.png?raw=true) - -### Menu Form - -![menu form](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/menu-form.png?raw=true) - -- name: The menu name -- position: The position of your custom menu, default `left` -- link_type: - 1. internal: django urls - 2. external: third part urls - 3. divide: link divide, like app verbose_name. -- link: - 1. `admin:index`: django url name, recommend. - 2. `/admin/`: django internal url, if you use i18n url, it's not a good choice. - 3. `http://`: outside url -- icon: [icon](https://adminlte.io/themes/AdminLTE/pages/UI/icons.html) -- content_type: Use for permission control, if user don't have permission to access the `app_label:model` in content_type, it will be skipped. -- valid: This menu item effective only when the valid is True. -- priority_level: default 100, use for ordering. `The bigger the priority` -- treebeard option: for order. - -### get django url name for link - -``` - -╰─$ python manage.py shell -Python 3.6.6 (default, Sep 29 2018, 19:18:41) -Type 'copyright', 'credits' or 'license' for more information -IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help. - -In [1]: from django.urls import resolve - -In [2]: resolve('/zh-hans/admin/video/parsed/') -Out[2]: ResolverMatch(func=django.contrib.admin.options.changelist_view, args=(), kwargs={}, -url_name=video_parsed_changelist, app_names=['admin'], namespaces=['admin'], route=zh-hans/admin/video/parsed/) - -``` - -django url name = namespaces:url_name - -## settings -in your setting.py `ADMINLTE_SETTINGS` - -### demo -Misleading demo features disabling/enabling -```python -ADMINLTE_SETTINGS = { - 'demo': True, -} -``` - -### search_form -Search form disabling/enabling - -```python -ADMINLTE_SETTINGS = { - 'search_form': True, -} -``` - -### skin -Skin choice -```python -ADMINLTE_SETTINGS = { - 'skin': True, -} -``` - -### copyright -Customer-specific copyright notice -```python -ADMINLTE_SETTINGS = { - 'copyright': 'John Smith', -} -``` - -### navigation_expanded -Navigation expanded feature, making navigation elements not being hidden under openable menu -```python -ADMINLTE_SETTINGS = { - 'navigation_expanded': True, -} -``` - -### show_apps -```python -ADMINLTE_SETTINGS = { - 'show_apps': ['django_admin_settings', 'auth', 'main'], -} -``` -### main_navigation_app -Main navigation app feature, where app models are put on top of the menu -```python -ADMINLTE_SETTINGS = { - 'main_navigation_app': 'django_admin_settings', -} -``` - -### apps -Modify apps icon & order apps/models - -```python -ADMINLTE_SETTINGS = { - 'apps': { - 'example-app': { - 'icon': 'fa-desktop', - 'models': { - 'example-model': { - 'icon': 'fa-archive' - }, - 'example-model1': {} - } - }, - 'auth': { - 'icon': 'fa-users' - } - } -} -``` \ No newline at end of file +![adminlte_select](../assets/images/adminlte_select_multiple.png) diff --git a/docs/en/index.md b/docs/en/index.md index 07e62b8..3fec882 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -52,7 +52,7 @@ INSTALLED_APPS = [ ## Features -- [Custom General Option](/django-adminlte-ui/2.x/guide/#general-option) +- [Custom General Option](/django-adminlte-ui/2.x/guide/#basic-info) - [Widgets](/django-adminlte-ui/2.x/guide/#widgets) - [Custom Menu](/django-adminlte-ui/2.x/guide/#menu) diff --git a/docs/zh/guide.md b/docs/zh/guide.md index 3e52d18..6b45534 100644 --- a/docs/zh/guide.md +++ b/docs/zh/guide.md @@ -1,123 +1,149 @@ -# Guides +# 指南 + +## 简单的示例 +通过继承`adminlte.core.AdminlteConfig`,并在django的settings中添加配置实现 +### 继承AdminlteConfig +```python title='adminlte_config.py' +# myserver/utils/adminlte_config.py +from adminlteui.core import AdminlteConfig + +class MyAdminlteConfig(AdminlteConfig): + skin = 'red' + welcome_sign = '欢迎访问xxx后端系统' + ... +``` +### django中settings配置 +```python title='settings.py' +ADMINLTE_CONFIG_CLASS = 'myserver.utils.adminlte_config.MyAdminlteConfig' +``` -## General Option +## 参数详解 +### 基础信息 +#### show_avatar +是否显示头像,默认为`False` +#### avatar_field +头像对应的url或者用户头像字段,默认为`None`,将渲染为`adminlteui/static/admin/dist/img/default.jpg` +#### username_field +用户名显示,默认为`None`,将渲染为`request.user.username` +#### site_logo +站点logo,默认为`None`,将渲染为`adminlteui/static/admin/dist/img/default-log.svg` +#### skin +站点主题,默认为`None`,将渲染为`blue` +#### sidebar_layout +侧边栏布局,默认为`fixed`,可选:['boxed', 'fixed'] +#### search_form +是否显示搜索框,默认为`True` +#### copyright +版权,默认为`None`,将渲染为django-adminlte-ui版本号 +#### welcome_sign +欢迎标志(登录页),默认为`None`,将渲染为芝麻开门 +### 菜单 +菜单通过继承`adminlte.core.MenuItem`实现,可对左侧菜单及顶部菜单进行自定义 + +MenuItem有三种`menu_type` + +- group:分组,用于将多个`model`或`link`类型的MenuItem显示到同一级菜单中 +- model:通过`label`绑定通过admin中注册的model页面,label命名规则`app_label.modelName` +- link:普通链接类型,直接通过url指定链接 + +示例 +```python title='adminlte_config.py' +from adminlte.core import MenuItem + +class MyAdminlteConfig(AdminlteConfig): + main_menu = [ + MenuItem(label='rpa', name='RPA服务', child=[ + MenuItem(label='rpa.Collector', menu_type='model'), + MenuItem(label='third', name='三级菜单', child=[ + MenuItem(label='github', name='Github', url='https://github.com/wuyue92tree', target_blank=True, menu_type='link'), + ]), + ]), + MenuItem(label='auth', name='认证和授权', icon='fa-users', child=[ + MenuItem(label='auth.User', name='用户', menu_type='model'), # (1) + MenuItem(label='auth.Group', name='组', menu_type='model'), + MenuItem(label='auth.link', name='/admin/auth/', menu_type='link', permissions=['auth.view_user']), # (2) + ]), + ] + top_menu = [ + MenuItem(label='outside_link', name='外部资源', child=[ + MenuItem(label='github', name='Github', url='https://github.com/wuyue92tree', target_blank=True, menu_type='link'), + ]), + MenuItem(label='rpa.Collector', menu_type='model'), + ] +``` -custom your site by inheritance `adminlte.core.AdminLteConfig`. +效果图 -```python -class AdminLteConfig(object): - show_avatar = False - avatar_field = 'request.user.avatar' +![menu](../assets/images/menu.png) - site_logo = None - site_header = 'AdminLteUI' +1. menu_type类型为model时,若不指定name,则默认显示为原model的verbose_name +2. menu_type类型为link时,可以通过绑定模型权限,控制menu的显示,`permissions`默认为空,不进行权限检测 - skin = None +#### main_menu +主菜单(左侧菜单),默认为`[]`,将渲染为所有已注册到admin中的model +> Tips: 可实现多级菜单 +#### top_menu +顶部菜单,默认为`[]`,将渲染为空 +> Tips: 顶部菜单将不显示Icon,并且最多显示二级菜单,多余的将被隐藏 - search_form = True - copyright = None - welcome_sign = None -``` +## ModelAdmin +扩展django的ModelAdmin +- 让`change_list`页面的table过滤器支持`select2` +- 自定义`change_list`页面搜索框的placeholder提示 -## ModelAdmin -- make change_list filter support select2 -- custom placeholder for search_fields - -```python -# adminlte/admin.py -class ModelAdmin(admin.ModelAdmin): - select2_list_filter = () - search_field_placeholder = '' - - class Media: - css = { - "all": ("admin/components/select2/dist/css/select2.min.css",) - } - js = ( - "admin/components/select2/dist/js/select2.min.js", - ) - - def changelist_view(self, request, extra_context=None): - view = super().changelist_view(request, extra_context) - cl = view.context_data.get('cl') - cl.search_field_placeholder = self.search_field_placeholder - filter_specs = cl.filter_specs - - for index, filter_spec in enumerate(filter_specs): - if filter_spec.field_path in self.select2_list_filter: - # flag to use select2 - filter_spec.display_select2 = True - cl.filter_specs[index] = filter_spec - view.context_data['cl'] = cl - return view +示例 +```python title='admin.py' +from adminlte.admin import ModelAdmin + +class CollectorModelAdmin(ModelAdmin): + select2_list_filter = ('project', 'source') # (1) + search_field_placeholder = '描述/起始URL' # (2) + ... ``` -## Widgets +1. 将需要使用select2的筛选fields加入该tuple中 +2. 将待显示的搜索框提示信息赋值 + +效果图 + +![modeladmin](../assets/images/modeladmin.png) + +## Widgets组件 ### AdminlteSelect -> Since v1.5.0b0, you don't need modify new template to active select2. +> 自 v1.5.0b0 版本之后, 将不再需要通过template覆盖的方式激活select2. -example: -``` -# adminlte/admin.py -@admin.register(Menu) -class MenuAdmin(TreeAdmin): +示例: +```python title='rpa/admin.py' +@admin.register(Collector) +class CollectorAdmin(admin.ModelAdmin): ... - # change_form_template = 'adminlte/menu_change_form.html' formfield_overrides = { models.ForeignKey: {'widget': AdminlteSelect} } - -# adminlte/menu_change_form.html -# active the target select -# {% extends 'admin/change_form.html' %} - -# {% block extrajs %} -# {{ block.super }} -# -# {% endblock %} ``` -effect: +效果图: -![adminlte_select](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/adminlte_select.png?raw=true) +![adminlte_select](../assets/images/adminlte_select.png) ### AdminlteSelectMultiple -> Since v1.5.0b0, you don't need modify new template to active select2. +> 自 v1.5.0b0 版本之后, 将不再需要通过template覆盖的方式激活select2. -example: -``` -# adminlte/admin.py -@admin.register(Menu) -class MenuAdmin(TreeAdmin): +示例: +```python title='rpa/admin.py' +@admin.register(Collector) +class CollectorAdmin(admin.ModelAdmin): ... - # change_form_template = 'adminlte/menu_change_form.html' formfield_overrides = { # multiple for ManayToManyField models.ManayToManyField: {'widget': AdminlteSelectMultiple( attr={'style': 'width: 100%'} )} } - -# adminlte/menu_change_form.html -# active the target select -# {% extends 'admin/change_form.html' %} - -# {% block extrajs %} -# {{ block.super }} -# -# {% endblock %} ``` -effect: - -![adminlte_select](https://github.com/wuyue92tree/django-adminlte-ui/blob/master/images/adminlte_select_multiple.png?raw=true) - - -## Menu +效果图: +![adminlte_select](../assets/images/adminlte_select_multiple.png) diff --git a/docs/zh/index.md b/docs/zh/index.md index cad622a..a3d1b6e 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -1,4 +1,4 @@ -# Welcome to django-adminlte-ui +# 欢迎使用 django-adminlte-ui [![PyPI Version](https://img.shields.io/pypi/v/django-adminlte-ui.svg)](https://pypi.python.org/pypi/django-adminlte-ui) [![Download Status](https://img.shields.io/pypi/dm/django-adminlte-ui.svg)](https://pypi.python.org/pypi/django-adminlte-ui) @@ -52,9 +52,9 @@ INSTALLED_APPS = [ ## 功能 -- [自定义属性](/django-adminlte-ui/2.x/zh/guide/#general-option) +- [自定义属性](/django-adminlte-ui/2.x/zh/guide/#_4) - [Widget组件](/django-adminlte-ui/2.x/zh/guide/#widgets) -- [自定义菜单](/django-adminlte-ui/2.x/zh/guide/#menu) +- [自定义菜单](/django-adminlte-ui/2.x/zh/guide/#_5) ## 鸣谢 diff --git a/mkdocs.yml b/mkdocs.yml index eedb357..6948a8e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,15 @@ theme: font: false icon: logo: material/file-document-multiple + features: + - content.code.copy + - content.code.annotate +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences extra: social: