├── admin_refresh ├── __init__.py ├── static │ └── admin │ │ ├── css │ │ ├── dark_mode.css │ │ ├── responsive.css │ │ ├── dashboard.css │ │ ├── nav_sidebar.css │ │ └── base.css │ │ └── js │ │ ├── jquery.init.js │ │ ├── popup_response.js │ │ ├── vendor │ │ ├── select2 │ │ │ ├── i18n │ │ │ │ ├── zh-TW.js │ │ │ │ ├── zh-CN.js │ │ │ │ ├── ja.js │ │ │ │ ├── az.js │ │ │ │ ├── ko.js │ │ │ │ ├── vi.js │ │ │ │ ├── tk.js │ │ │ │ ├── id.js │ │ │ │ ├── tr.js │ │ │ │ ├── ar.js │ │ │ │ ├── th.js │ │ │ │ ├── nb.js │ │ │ │ ├── km.js │ │ │ │ ├── sv.js │ │ │ │ ├── is.js │ │ │ │ ├── fi.js │ │ │ │ ├── et.js │ │ │ │ ├── hu.js │ │ │ │ ├── ms.js │ │ │ │ ├── da.js │ │ │ │ ├── ka.js │ │ │ │ ├── bg.js │ │ │ │ ├── hy.js │ │ │ │ ├── fa.js │ │ │ │ ├── en.js │ │ │ │ ├── hi.js │ │ │ │ ├── he.js │ │ │ │ ├── hr.js │ │ │ │ ├── de.js │ │ │ │ ├── af.js │ │ │ │ ├── eu.js │ │ │ │ ├── mk.js │ │ │ │ ├── pt-BR.js │ │ │ │ ├── pt.js │ │ │ │ ├── bn.js │ │ │ │ ├── lv.js │ │ │ │ ├── ca.js │ │ │ │ ├── ps.js │ │ │ │ ├── sq.js │ │ │ │ ├── it.js │ │ │ │ ├── nl.js │ │ │ │ ├── ne.js │ │ │ │ ├── fr.js │ │ │ │ ├── es.js │ │ │ │ ├── gl.js │ │ │ │ ├── sl.js │ │ │ │ ├── ro.js │ │ │ │ ├── lt.js │ │ │ │ ├── pl.js │ │ │ │ ├── bs.js │ │ │ │ ├── el.js │ │ │ │ ├── sr.js │ │ │ │ ├── uk.js │ │ │ │ ├── sr-Cyrl.js │ │ │ │ ├── ru.js │ │ │ │ ├── hsb.js │ │ │ │ ├── dsb.js │ │ │ │ ├── cs.js │ │ │ │ └── sk.js │ │ │ └── LICENSE.md │ │ ├── jquery │ │ │ └── LICENSE.txt │ │ └── xregexp │ │ │ └── LICENSE.txt │ │ ├── prepopulate_init.js │ │ ├── change_form.js │ │ ├── cancel.js │ │ ├── autocomplete.js │ │ ├── prepopulate.js │ │ ├── collapse.js │ │ ├── nav_sidebar.js │ │ ├── SelectBox.js │ │ ├── core.js │ │ ├── urlify.js │ │ ├── admin │ │ └── RelatedObjectLookups.js │ │ ├── actions.js │ │ └── calendar.js ├── templates │ ├── admin │ │ ├── widgets │ │ │ ├── radio.html │ │ │ ├── many_to_many_raw_id.html │ │ │ ├── url.html │ │ │ ├── split_datetime.html │ │ │ ├── foreign_key_raw_id.html │ │ │ ├── clearable_file_input.html │ │ │ └── related_widget_wrapper.html │ │ ├── includes │ │ │ ├── object_delete_summary.html │ │ │ └── fieldset.html │ │ ├── prepopulated_fields_js.html │ │ ├── 404.html │ │ ├── filter.html │ │ ├── auth │ │ │ └── user │ │ │ │ ├── add_form.html │ │ │ │ └── change_password.html │ │ ├── base_site.html │ │ ├── popup_response.html │ │ ├── change_form_object_tools.html │ │ ├── change_list_object_tools.html │ │ ├── app_index.html │ │ ├── invalid_setup.html │ │ ├── date_hierarchy.html │ │ ├── pagination.html │ │ ├── 500.html │ │ ├── nav_sidebar.html │ │ ├── submit_line.html │ │ ├── search_form.html │ │ ├── actions.html │ │ ├── change_list_results.html │ │ ├── index.html │ │ ├── app_list.html │ │ ├── login.html │ │ ├── object_history.html │ │ ├── delete_selected_confirmation.html │ │ ├── delete_confirmation.html │ │ ├── edit_inline │ │ │ ├── stacked.html │ │ │ └── tabular.html │ │ ├── change_form.html │ │ ├── change_list.html │ │ └── base.html │ ├── registration │ │ ├── password_reset_complete.html │ │ ├── logged_out.html │ │ ├── password_change_done.html │ │ ├── password_reset_done.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ ├── password_reset_confirm.html │ │ └── password_change_form.html │ └── admin_doc │ │ ├── missing_docutils.html │ │ ├── view_detail.html │ │ ├── template_detail.html │ │ ├── bookmarklets.html │ │ ├── index.html │ │ ├── model_index.html │ │ ├── template_tag_index.html │ │ ├── view_index.html │ │ ├── template_filter_index.html │ │ └── model_detail.html └── apps.py ├── setup.py ├── package.json ├── requirements └── dev.txt ├── MANIFEST.in ├── pyproject.toml ├── .editorconfig ├── .pre-commit-config.yaml ├── .github └── workflows │ └── ci.yml ├── setup.cfg ├── LICENSE ├── .eslintrc ├── README.md └── .gitignore /admin_refresh/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/css/dark_mode.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/css/responsive.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup() 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "eslint": "^8.5.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/radio.html: -------------------------------------------------------------------------------- 1 | {% include "django/forms/widgets/multiple_input.html" %} 2 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/many_to_many_raw_id.html: -------------------------------------------------------------------------------- 1 | {% include 'admin/widgets/foreign_key_raw_id.html' %} 2 | -------------------------------------------------------------------------------- /requirements/dev.txt: -------------------------------------------------------------------------------- 1 | https://github.com/django/django/archive/refs/heads/main.zip 2 | black 3 | isort 4 | pre-commit 5 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include README.rst 3 | recursive-include admin_refresh/static * 4 | recursive-include admin_refresh/templates * 5 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | build-backend = "setuptools.build_meta" 3 | requires = ["setuptools", "wheel"] 4 | 5 | [tool.isort] 6 | profile = "black" 7 | -------------------------------------------------------------------------------- /admin_refresh/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CorsHeadersAppConfig(AppConfig): 5 | name = "admin_refresh" 6 | verbose_name = "django-admin-refresh" 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | insert_final_newline = true 8 | indent_size = 4 9 | 10 | [*.{html,svg,yaml,yml}] 11 | indent_size = 2 12 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/url.html: -------------------------------------------------------------------------------- 1 | {% if url_valid %}

{{ current_label }} {{ widget.value }}
{{ change_label }} {% endif %}{% include "django/forms/widgets/input.html" %}{% if url_valid %}

{% endif %} 2 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/includes/object_delete_summary.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% translate "Summary" %}

3 | 8 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/prepopulated_fields_js.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 6 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/split_datetime.html: -------------------------------------------------------------------------------- 1 |

2 | {{ date_label }} {% with widget=widget.subwidgets.0 %}{% include widget.template_name %}{% endwith %}
3 | {{ time_label }} {% with widget=widget.subwidgets.1 %}{% include widget.template_name %}{% endwith %} 4 |

5 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/404.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% translate 'Page not found' %}{% endblock %} 5 | 6 | {% block content %} 7 | 8 |

{% translate 'Page not found' %}

9 | 10 |

{% translate 'We’re sorry, but the requested page could not be found.' %}

11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/filter.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |

{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}

3 | 9 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/foreign_key_raw_id.html: -------------------------------------------------------------------------------- 1 | {% include 'django/forms/widgets/input.html' %}{% if related_url %}{% endif %}{% if link_label %} 2 | {% if link_url %}{% endif %}{{ link_label }}{% if link_url %}{% endif %}{% endif %} 3 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/jquery.init.js: -------------------------------------------------------------------------------- 1 | /*global jQuery:false*/ 2 | 'use strict'; 3 | /* Puts the included jQuery into our own namespace using noConflict and passing 4 | * it 'true'. This ensures that the included jQuery doesn't pollute the global 5 | * namespace (i.e. this preserves pre-existing values for both window.$ and 6 | * window.jQuery). 7 | */ 8 | window.django = {jQuery: jQuery.noConflict(true)}; 9 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/auth/user/add_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | {% load i18n %} 3 | 4 | {% block form_top %} 5 | {% if not is_popup %} 6 |

{% translate 'First, enter a username and password. Then, you’ll be able to edit more user options.' %}

7 | {% else %} 8 |

{% translate "Enter a username and password." %}

9 | {% endif %} 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/base_site.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | 3 | {% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %} 4 | 5 | {% block branding %} 6 | {{ site_header|default:_('Django administration') }} 7 | {% endblock %} 8 | 9 | {% block nav-global %}{% endblock %} 10 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/popup_response.html: -------------------------------------------------------------------------------- 1 | {% load i18n static %} 2 | 3 | {% translate 'Popup closing…' %} 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/change_form_object_tools.html: -------------------------------------------------------------------------------- 1 | {% load i18n admin_urls %} 2 | {% block object-tools-items %} 3 |
  • 4 | {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} 5 | {% translate "History" %} 6 |
  • 7 | {% if has_absolute_url %}
  • {% translate "View on site" %}
  • {% endif %} 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/change_list_object_tools.html: -------------------------------------------------------------------------------- 1 | {% load i18n admin_urls %} 2 | 3 | {% block object-tools-items %} 4 | {% if has_add_permission %} 5 |
  • 6 | {% url cl.opts|admin_urlname:'add' as add_url %} 7 | 8 | {% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %} 9 | 10 |
  • 11 | {% endif %} 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/app_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/index.html" %} 2 | {% load i18n %} 3 | 4 | {% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %} 5 | 6 | {% if not is_popup %} 7 | {% block breadcrumbs %} 8 | 15 | {% endblock %} 16 | {% endif %} 17 | 18 | {% block sidebar %}{% endblock %} 19 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/invalid_setup.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 |

    {% translate '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.' %}

    13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 |

    {% translate "Your password has been set. You may go ahead and log in now." %}

    14 | 15 |

    {% translate 'Log in' %}

    16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | #recent-actions-module { 2 | background: var(--sidebar-bg); 3 | padding: 1em; 4 | } 5 | 6 | #recent-actions-module h3 { 7 | margin: 1em 0; 8 | } 9 | 10 | .actionlist { 11 | padding-left: 1.25em; 12 | } 13 | 14 | .actionlist li { 15 | margin-bottom: .5em; 16 | } 17 | 18 | .actionlist .added { 19 | list-style: var(--icon-add); 20 | } 21 | 22 | .actionlist .changed { 23 | list-style: var(--icon-change); 24 | } 25 | 26 | .actionlist .deleted { 27 | list-style: var(--icon-delete); 28 | } 29 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/logged_out.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %}{% endblock %} 5 | 6 | {% block nav-sidebar-toggle %}{% endblock %} 7 | {% block nav-sidebar %}{% endblock %} 8 | 9 | {% block content %} 10 | 11 |

    {% translate "Thanks for spending some quality time with the web site today." %}

    12 | 13 |

    {% translate 'Log in again' %}

    14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/date_hierarchy.html: -------------------------------------------------------------------------------- 1 | {% if show %} 2 |
    3 |
    15 |
    16 | {% endif %} 17 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/pagination.html: -------------------------------------------------------------------------------- 1 | {% load admin_list %} 2 | {% load i18n %} 3 |

    4 | {% if pagination_required %} 5 | {% for i in page_range %} 6 | {% paginator_number cl i %} 7 | {% endfor %} 8 | {% endif %} 9 | {{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %} 10 | {% if show_all_url %}{% translate 'Show all' %}{% endif %} 11 | {% if cl.formset and cl.result_count %}{% endif %} 12 |

    13 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/500.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | 11 | {% block title %}{% translate 'Server error (500)' %}{% endblock %} 12 | 13 | {% block content %} 14 |

    {% translate 'Server Error (500)' %}

    15 |

    {% translate 'There’s been an error. It’s been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.' %}

    16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/popup_response.js: -------------------------------------------------------------------------------- 1 | /*global opener */ 2 | 'use strict'; 3 | { 4 | const initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse); 5 | switch(initData.action) { 6 | case 'change': 7 | opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value); 8 | break; 9 | case 'delete': 10 | opener.dismissDeleteRelatedObjectPopup(window, initData.value); 11 | break; 12 | default: 13 | opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj); 14 | break; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | exclude: "admin_refresh/static/admin/js/vendor/.*" 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v4.1.0 5 | hooks: 6 | - id: check-added-large-files 7 | - id: check-ast 8 | - id: check-json 9 | - id: check-merge-conflict 10 | - id: check-toml 11 | - id: check-yaml 12 | - id: debug-statements 13 | - id: end-of-file-fixer 14 | - id: trailing-whitespace 15 | - repo: https://github.com/PyCQA/isort 16 | rev: "5.10.1" 17 | hooks: 18 | - id: isort 19 | - repo: https://github.com/psf/black 20 | rev: "21.12b0" 21 | hooks: 22 | - id: black 23 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/clearable_file_input.html: -------------------------------------------------------------------------------- 1 | {% if widget.is_initial %}

    {{ widget.initial_text }}: {{ widget.value }}{% if not widget.required %} 2 | 3 | 4 | {% endif %}
    5 | {{ widget.input_text }}:{% endif %} 6 | {% if widget.is_initial %}

    {% endif %} 7 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/prepopulate_init.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const $ = django.jQuery; 4 | const fields = $('#django-admin-prepopulated-fields-constants').data('prepopulatedFields'); 5 | $.each(fields, function(index, field) { 6 | $( 7 | '.empty-form .form-row .field-' + field.name + 8 | ', .empty-form.form-row .field-' + field.name + 9 | ', .empty-form .form-row.field-' + field.name 10 | ).addClass('prepopulated_field'); 11 | $(field.id).data('dependency_list', field.dependency_list).prepopulate( 12 | field.dependency_ids, field.maxLength, field.allowUnicode 13 | ); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_change_done.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | {% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% translate 'Documentation' %} / {% endif %}{% translate 'Change password' %} / {% translate 'Log out' %}{% endblock %} 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 |

    {% translate 'Your password was changed.' %}

    13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/change_form.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const inputTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; 4 | const modelName = document.getElementById('django-admin-form-add-constants').dataset.modelName; 5 | if (modelName) { 6 | const form = document.getElementById(modelName + '_form'); 7 | for (const element of form.elements) { 8 | // HTMLElement.offsetParent returns null when the element is not 9 | // rendered. 10 | if (inputTags.includes(element.tagName) && !element.disabled && element.offsetParent) { 11 | element.focus(); 12 | break; 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 | 13 |

    {% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}

    14 | 15 |

    {% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}

    16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_reset_email.html: -------------------------------------------------------------------------------- 1 | {% load i18n %}{% autoescape off %} 2 | {% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %} 3 | 4 | {% translate "Please go to the following page and choose a new password:" %} 5 | {% block reset_link %} 6 | {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} 7 | {% endblock %} 8 | {% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }} 9 | 10 | {% translate "Thanks for using our site!" %} 11 | 12 | {% blocktranslate %}The {{ site_name }} team{% endblocktranslate %} 13 | 14 | {% endautoescape %} 15 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ja.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | release: 13 | if: ${{ github.event_name == 'release' }} 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/setup-python@v2 17 | - uses: actions/checkout@v2 18 | - name: build 19 | run: | 20 | python -m pip install setuptools twine wheel 21 | python setup.py sdist bdist_wheel 22 | - name: publish 23 | env: 24 | TWINE_USERNAME: __token__ 25 | TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} 26 | TWINE_NON_INTERACTIVE: 1 27 | run: twine upload dist/* 28 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/az.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/tk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ar.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/templates/admin/nav_sidebar.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 23 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/km.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = django-admin-refresh 3 | version = 0.1.1 4 | description = A refresh of the Django admin interface 5 | long_description = file: README.md 6 | url = https://github.com/knyghty/django-admin-refresh 7 | author = Tom Carrick 8 | author_email = tom@carrick.eu 9 | classifiers = 10 | Development Status :: 2 - Pre-Alpha 11 | Framework :: Django 12 | Intended Audience :: Developers 13 | License :: OSI Approved :: MIT License 14 | Operating System :: OS Independent 15 | Programming Language :: Python 16 | Programming Language :: Python :: 3 17 | Programming Language :: Python :: 3 :: Only 18 | Topic :: Internet :: WWW/HTTP 19 | 20 | [options] 21 | include_package_data = true 22 | packages = find: 23 | python_requires = >=3.8 24 | install_requires = 25 | Django 26 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ka.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/bg.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/hy.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها می‌توانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/af.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/bn.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ps.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sq.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/missing_docutils.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | {% block title %}{% translate 'Please install docutils' %}{% endblock %} 11 | 12 | {% block content %} 13 | 14 |

    {% translate 'Documentation' %}

    15 | 16 |
    17 |

    {% blocktranslate with "https://docutils.sourceforge.io/" as link %}The admin documentation system requires Python’s docutils library.{% endblocktranslate %}

    18 | 19 |

    {% blocktranslate with "https://docutils.sourceforge.io/" as link %}Please ask your administrators to install docutils.{% endblocktranslate %}

    20 |
    21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ne.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/bs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/hsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/dsb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}(); -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_reset_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | 4 | {% block extrastyle %}{{ block.super }}{% endblock %} 5 | {% block breadcrumbs %} 6 | 10 | {% endblock %} 11 | 12 | {% block content %} 13 | 14 |

    {% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}

    15 | 16 |
    {% csrf_token %} 17 |
    18 |
    19 | {{ form.email.errors }} 20 | 21 | {{ form.email }} 22 |
    23 | 24 |
    25 |
    26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/cancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | // Call function fn when the DOM is loaded and ready. If it is already 4 | // loaded, call the function now. 5 | // http://youmightnotneedjquery.com/#ready 6 | function ready(fn) { 7 | if (document.readyState !== 'loading') { 8 | fn(); 9 | } else { 10 | document.addEventListener('DOMContentLoaded', fn); 11 | } 12 | } 13 | 14 | ready(function() { 15 | function handleClick(event) { 16 | event.preventDefault(); 17 | const params = new URLSearchParams(window.location.search); 18 | if (params.has('_popup')) { 19 | window.close(); // Close the popup. 20 | } else { 21 | window.history.back(); // Otherwise, go back. 22 | } 23 | } 24 | 25 | document.querySelectorAll('.cancel-link').forEach(function(el) { 26 | el.addEventListener('click', handleClick); 27 | }); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/view_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 11 | {% endblock %} 12 | {% block title %}{% blocktranslate %}View: {{ name }}{% endblocktranslate %}{% endblock %} 13 | 14 | {% block content %} 15 | 16 |

    {{ name }}

    17 | 18 |

    {{ summary|striptags }}

    19 | 20 | {{ body }} 21 | 22 | {% if meta.Context %} 23 |

    {% translate 'Context:' %}

    24 |

    {{ meta.Context }}

    25 | {% endif %} 26 | 27 | {% if meta.Templates %} 28 |

    {% translate 'Templates:' %}

    29 |

    {{ meta.Templates }}

    30 | {% endif %} 31 | 32 |

    ‹ {% translate 'Back to View documentation' %}

    33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/submit_line.html: -------------------------------------------------------------------------------- 1 | {% load i18n admin_urls %} 2 |
    3 | {% block submit-row %} 4 | {% if show_save %}{% endif %} 5 | {% if show_delete_link and original %} 6 | {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} 7 | 8 | {% endif %} 9 | {% if show_save_as_new %}{% endif %} 10 | {% if show_save_and_add_another %}{% endif %} 11 | {% if show_save_and_continue %}{% endif %} 12 | {% if show_close %}{% translate 'Close' %}{% endif %} 13 | {% endblock %} 14 |
    15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Tom Carrick 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/template_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 11 | {% endblock %} 12 | 13 | {% block title %}{% blocktranslate %}Template: {{ name }}{% endblocktranslate %}{% endblock %} 14 | 15 | {% block content %} 16 |

    {% blocktranslate %}Template: {{ name }}{% endblocktranslate %}

    17 | 18 | {# Translators: Search is not a verb here, it qualifies path (a search path) #} 19 |

    {% blocktranslate %}Search path for template {{ name }}:{% endblocktranslate %}

    20 |
      21 | {% for template in templates|dictsort:"order" %} 22 |
    1. {{ template.file }}{% if not template.exists %} {% translate '(does not exist)' %}{% endif %}
    2. 23 | {% endfor %} 24 |
    25 | 26 |

    ‹ {% translate 'Back to Documentation' %}

    27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/xregexp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2017 Steven Levithan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/templates/admin/search_form.html: -------------------------------------------------------------------------------- 1 | {% load i18n static %} 2 | {% if cl.search_fields %} 3 |
    20 | {% endif %} 21 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/vendor/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}(); -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/autocomplete.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const $ = django.jQuery; 4 | 5 | $.fn.djangoAdminSelect2 = function() { 6 | $.each(this, function(i, element) { 7 | $(element).select2({ 8 | ajax: { 9 | data: (params) => { 10 | return { 11 | term: params.term, 12 | page: params.page, 13 | app_label: element.dataset.appLabel, 14 | model_name: element.dataset.modelName, 15 | field_name: element.dataset.fieldName 16 | }; 17 | } 18 | } 19 | }); 20 | }); 21 | return this; 22 | }; 23 | 24 | $(function() { 25 | // Initialize all autocomplete widgets except the one in the template 26 | // form used when a new formset is added. 27 | $('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2(); 28 | }); 29 | 30 | $(document).on('formset:added', (function() { 31 | return function(event, $newFormset) { 32 | return $newFormset.find('.admin-autocomplete').djangoAdminSelect2(); 33 | }; 34 | })(this)); 35 | } 36 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/actions.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |
    3 | {% block actions %} 4 | {% block actions-form %} 5 | {% for field in action_form %}{% if field.label %}{% endif %}{% endfor %} 6 | {% endblock %} 7 | {% block actions-submit %} 8 | 9 | {% endblock %} 10 | {% block actions-counter %} 11 | {% if actions_selection_counter %} 12 | {{ selection_note }} 13 | {% if cl.result_count != cl.result_list|length %} 14 | 15 | 18 | 19 | {% endif %} 20 | {% endif %} 21 | {% endblock %} 22 | {% endblock %} 23 |
    24 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/bookmarklets.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 10 | {% endblock %} 11 | {% block title %}{% translate "Documentation bookmarklets" %}{% endblock %} 12 | 13 | {% block content %} 14 | 15 |

    {% blocktranslate trimmed %} 16 | To install bookmarklets, drag the link to your bookmarks toolbar, or right-click 17 | the link and add it to your bookmarks. Now you can select the bookmarklet 18 | from any page in the site. 19 | {% endblocktranslate %}

    20 | 21 |
    22 |

    {% translate "Documentation for this page" %}

    23 |

    {% translate "Jumps you from any page to the documentation for the view that generates that page." %}

    24 |
    25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "camelcase": ["off", {"properties": "always"}], 4 | "comma-spacing": ["error", {"before": false, "after": true}], 5 | "curly": ["error", "all"], 6 | "dot-notation": ["error", {"allowKeywords": true}], 7 | "eqeqeq": ["error"], 8 | "indent": ["error", 4], 9 | "key-spacing": ["error", {"beforeColon": false, "afterColon": true}], 10 | "linebreak-style": ["error", "unix"], 11 | "new-cap": ["off", {"newIsCap": true, "capIsNew": true}], 12 | "no-alert": ["off"], 13 | "no-eval": ["error"], 14 | "no-extend-native": ["error", {"exceptions": ["Date", "String"]}], 15 | "no-multi-spaces": ["error"], 16 | "no-octal-escape": ["error"], 17 | "no-script-url": ["error"], 18 | "no-shadow": ["error", {"hoist": "functions"}], 19 | "no-underscore-dangle": ["error"], 20 | "no-unused-vars": ["error", {"vars": "local", "args": "none"}], 21 | "no-var": ["error"], 22 | "prefer-const": ["error"], 23 | "quotes": ["off", "single"], 24 | "semi": ["error", "always"], 25 | "space-before-blocks": ["error", "always"], 26 | "space-before-function-paren": ["error", {"anonymous": "never", "named": "never"}], 27 | "space-infix-ops": ["error", {"int32Hint": false}], 28 | "strict": ["error", "global"] 29 | }, 30 | "env": { 31 | "browser": true, 32 | "es6": true 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 | 9 | {% endblock %} 10 | {% block title %}{% translate 'Documentation' %}{% endblock %} 11 | 12 | {% block content %} 13 | 14 |

    {% translate 'Documentation' %}

    15 | 16 |
    17 |

    {% translate 'Tags' %}

    18 |

    {% translate 'List of all the template tags and their functions.' %}

    19 | 20 |

    {% translate 'Filters' %}

    21 |

    {% translate 'Filters are actions which can be applied to variables in a template to alter the output.' %}

    22 | 23 |

    {% translate 'Models' %}

    24 |

    {% translate 'Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables' %}.

    25 | 26 |

    {% translate 'Views' %}

    27 |

    {% translate 'Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.' %}

    28 | 29 |

    {% translate 'Bookmarklets' %}

    30 |

    {% translate 'Tools for your browser to quickly access admin functionality.' %}

    31 |
    32 | 33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | 4 | {% block extrastyle %}{{ block.super }}{% endblock %} 5 | {% block breadcrumbs %} 6 | 10 | {% endblock %} 11 | 12 | {% block content %} 13 | 14 | {% if validlink %} 15 | 16 |

    {% translate "Please enter your new password twice so we can verify you typed it in correctly." %}

    17 | 18 |
    {% csrf_token %} 19 |
    20 | 21 |
    22 | {{ form.new_password1.errors }} 23 | 24 | {{ form.new_password1 }} 25 |
    26 |
    27 | {{ form.new_password2.errors }} 28 | 29 | {{ form.new_password2 }} 30 |
    31 | 32 |
    33 |
    34 | 35 | {% else %} 36 | 37 |

    {% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

    38 | 39 | {% endif %} 40 | 41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/model_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block coltype %}colSM{% endblock %} 5 | 6 | {% block breadcrumbs %} 7 | 12 | {% endblock %} 13 | 14 | {% block title %}{% translate 'Models' %}{% endblock %} 15 | 16 | {% block content %} 17 | 18 |

    {% translate 'Model documentation' %}

    19 | 20 | {% regroup models by app_config as grouped_models %} 21 | 22 |
    23 | {% for group in grouped_models %} 24 |
    25 |

    {{ group.grouper.verbose_name }} ({{ group.grouper.name }})

    26 | 27 | 28 | {% for model in group.list %} 29 | 30 | 31 | 32 | {% endfor %} 33 |
    {{ model.object_name }}
    34 |
    35 | {% endfor %} 36 | 37 |
    38 | {% endblock %} 39 | 40 | {% block sidebar %} 41 | 52 | {% endblock %} 53 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/widgets/related_widget_wrapper.html: -------------------------------------------------------------------------------- 1 | {% load i18n static %} 2 | 32 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/change_list_results.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% if result_hidden_fields %} 3 |
    {# DIV for HTML validation #} 4 | {% for item in result_hidden_fields %}{{ item }}{% endfor %} 5 |
    6 | {% endif %} 7 | {% if results %} 8 |
    9 | 10 | 11 | 12 | {% for header in result_headers %} 13 | {% endfor %} 26 | 27 | 28 | 29 | {% for result in results %} 30 | {% if result.form and result.form.non_field_errors %} 31 | 32 | {% endif %} 33 | {% for item in result %}{{ item }}{% endfor %} 34 | {% endfor %} 35 | 36 |
    14 | {% if header.sortable %} 15 | {% if header.sort_priority > 0 %} 16 |
    17 | 18 | {% if num_sorted_fields > 1 %}{{ header.sort_priority }}{% endif %} 19 | 20 |
    21 | {% endif %} 22 | {% endif %} 23 |
    {% if header.sortable %}{{ header.text|capfirst }}{% else %}{{ header.text|capfirst }}{% endif %}
    24 |
    25 |
    {{ result.form.non_field_errors }}
    37 |
    38 | {% endif %} 39 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/prepopulate.js: -------------------------------------------------------------------------------- 1 | /*global URLify*/ 2 | 'use strict'; 3 | { 4 | const $ = django.jQuery; 5 | $.fn.prepopulate = function(dependencies, maxLength, allowUnicode) { 6 | /* 7 | Depends on urlify.js 8 | Populates a selected field with the values of the dependent fields, 9 | URLifies and shortens the string. 10 | dependencies - array of dependent fields ids 11 | maxLength - maximum length of the URLify'd string 12 | allowUnicode - Unicode support of the URLify'd string 13 | */ 14 | return this.each(function() { 15 | const prepopulatedField = $(this); 16 | 17 | const populate = function() { 18 | // Bail if the field's value has been changed by the user 19 | if (prepopulatedField.data('_changed')) { 20 | return; 21 | } 22 | 23 | const values = []; 24 | $.each(dependencies, function(i, field) { 25 | field = $(field); 26 | if (field.val().length > 0) { 27 | values.push(field.val()); 28 | } 29 | }); 30 | prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode)); 31 | }; 32 | 33 | prepopulatedField.data('_changed', false); 34 | prepopulatedField.on('change', function() { 35 | prepopulatedField.data('_changed', true); 36 | }); 37 | 38 | if (!prepopulatedField.val()) { 39 | $(dependencies.join(',')).on('keyup change focus', populate); 40 | } 41 | }); 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/includes/fieldset.html: -------------------------------------------------------------------------------- 1 |
    2 | {% if fieldset.name %}

    {{ fieldset.name }}

    {% endif %} 3 | {% if fieldset.description %} 4 |
    {{ fieldset.description|safe }}
    5 | {% endif %} 6 | {% for line in fieldset %} 7 |
    8 | {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %} 9 | {% for field in line %} 10 | 11 | {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} 12 | {% if field.is_checkbox %} 13 | {{ field.field }}{{ field.label_tag }} 14 | {% else %} 15 | {{ field.label_tag }} 16 | {% if field.is_readonly %} 17 |
    {{ field.contents }}
    18 | {% else %} 19 | {{ field.field }} 20 | {% endif %} 21 | {% endif %} 22 | {% if field.field.help_text %} 23 |
    {{ field.field.help_text|safe }}
    24 | {% endif %} 25 |
    26 | {% endfor %} 27 | 28 | {% endfor %} 29 |
    30 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | 4 | {% block extrastyle %} 5 | {{ block.super }} 6 | 7 | {% endblock %} 8 | 9 | {% block coltype %}with-sidebar{% endblock %} 10 | 11 | {% block bodyclass %}{{ block.super }} dashboard{% endblock %} 12 | 13 | {% block breadcrumbs %}{% endblock %} 14 | 15 | {% block content %} 16 |
    17 | {% include "admin/app_list.html" with app_list=app_list show_changelinks=True %} 18 |
    19 | {% endblock %} 20 | 21 | {% block sidebar %} 22 | 51 | {% endblock %} 52 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/app_list.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% if app_list %} 4 | {% for app in app_list %} 5 |
    6 | 7 | 10 | {% for model in app.models %} 11 | 12 | {% if model.admin_url %} 13 | 14 | {% else %} 15 | 16 | {% endif %} 17 | 18 | {% if model.add_url %} 19 | 20 | {% else %} 21 | 22 | {% endif %} 23 | 24 | {% if model.admin_url and show_changelinks %} 25 | {% if model.view_only %} 26 | 27 | {% else %} 28 | 29 | {% endif %} 30 | {% elif show_changelinks %} 31 | 32 | {% endif %} 33 | 34 | {% endfor %} 35 |
    8 | {{ app.name }} 9 |
    {{ model.name }}{{ model.name }}{% translate 'Add' %}{% translate 'View' %}{% translate 'Change' %}
    36 |
    37 | {% endfor %} 38 | {% else %} 39 |

    {% translate 'You don’t have permission to view or edit anything.' %}

    40 | {% endif %} 41 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | /*global gettext*/ 2 | 'use strict'; 3 | { 4 | window.addEventListener('load', function() { 5 | // Add anchor tag for Show/Hide link 6 | const fieldsets = document.querySelectorAll('fieldset.collapse'); 7 | for (const [i, elem] of fieldsets.entries()) { 8 | // Don't hide if fields in this fieldset have errors 9 | if (elem.querySelectorAll('div.errors, ul.errorlist').length === 0) { 10 | elem.classList.add('collapsed'); 11 | const h2 = elem.querySelector('h2'); 12 | const link = document.createElement('a'); 13 | link.id = 'fieldsetcollapser' + i; 14 | link.className = 'collapse-toggle'; 15 | link.href = '#'; 16 | link.textContent = gettext('Show'); 17 | h2.appendChild(document.createTextNode(' (')); 18 | h2.appendChild(link); 19 | h2.appendChild(document.createTextNode(')')); 20 | } 21 | } 22 | // Add toggle to hide/show anchor tag 23 | const toggleFunc = function(ev) { 24 | if (ev.target.matches('.collapse-toggle')) { 25 | ev.preventDefault(); 26 | ev.stopPropagation(); 27 | const fieldset = ev.target.closest('fieldset'); 28 | if (fieldset.classList.contains('collapsed')) { 29 | // Show 30 | ev.target.textContent = gettext('Hide'); 31 | fieldset.classList.remove('collapsed'); 32 | } else { 33 | // Hide 34 | ev.target.textContent = gettext('Show'); 35 | fieldset.classList.add('collapsed'); 36 | } 37 | } 38 | }; 39 | document.querySelectorAll('fieldset.module').forEach(function(el) { 40 | el.addEventListener('click', toggleFunc); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/template_tag_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block coltype %}colSM{% endblock %} 5 | {% block breadcrumbs %} 6 | 11 | {% endblock %} 12 | {% block title %}{% translate 'Template tags' %}{% endblock %} 13 | 14 | {% block content %} 15 | 16 |

    {% translate 'Template tag documentation' %}

    17 | 18 |
    19 | {% regroup tags|dictsort:"library" by library as tag_libraries %} 20 | {% for library in tag_libraries %} 21 |
    22 |

    {% firstof library.grouper _("Built-in tags") %}

    23 | {% if library.grouper %}

    {% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put {{ code }} in your template before using the tag.{% endblocktranslate %}


    {% endif %} 24 | {% for tag in library.list|dictsort:"name" %} 25 |

    {{ tag.name }}

    26 |

    {{ tag.title|striptags }}

    27 | {{ tag.body }} 28 | {% if not forloop.last %}
    {% endif %} 29 | {% endfor %} 30 |
    31 | {% endfor %} 32 |
    33 | 34 | {% endblock %} 35 | 36 | {% block sidebar %} 37 | 38 | 53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/view_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block coltype %}colSM{% endblock %} 5 | {% block breadcrumbs %} 6 | 11 | {% endblock %} 12 | {% block title %}{% translate 'Views' %}{% endblock %} 13 | 14 | {% block content %} 15 | 16 |

    {% translate 'View documentation' %}

    17 | 18 | {% regroup views|dictsort:'namespace' by namespace as views_by_ns %} 19 | 20 | 33 | 34 |
    35 | 36 | {% for ns_views in views_by_ns %} 37 |
    38 |

    39 | {% if ns_views.grouper %} 40 | {% blocktranslate with ns_views.grouper as name %}Views by namespace {{ name }}{% endblocktranslate %} 41 | {% else %} 42 | {% blocktranslate %}Views by empty namespace{% endblocktranslate %} 43 | {% endif %} 44 |

    45 | 46 | {% for view in ns_views.list|dictsort:"url" %} 47 | {% ifchanged %} 48 |

    {{ view.url }}

    49 |

    {% blocktranslate with view.full_name as full_name and view.url_name as url_name %} 50 | View function: {{ full_name }}. Name: {{ url_name }}. 51 | {% endblocktranslate %}

    52 |

    {{ view.title }}

    53 |
    54 | {% endifchanged %} 55 | {% endfor %} 56 |
    57 | {% endfor %} 58 |
    59 | {% endblock %} 60 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/template_filter_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block coltype %}colSM{% endblock %} 5 | {% block breadcrumbs %} 6 | 11 | {% endblock %} 12 | {% block title %}{% translate 'Template filters' %}{% endblock %} 13 | 14 | {% block content %} 15 | 16 |

    {% translate 'Template filter documentation' %}

    17 | 18 |
    19 | {% regroup filters|dictsort:"library" by library as filter_libraries %} 20 | {% for library in filter_libraries %} 21 |
    22 |

    {% firstof library.grouper _("Built-in filters") %}

    23 | {% if library.grouper %}

    {% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put {{ code }} in your template before using the filter.{% endblocktranslate %}


    {% endif %} 24 | {% for filter in library.list|dictsort:"name" %} 25 |

    {{ filter.name }}

    26 | {{ filter.title }} 27 | {{ filter.body }} 28 | {% if not forloop.last %}
    {% endif %} 29 | {% endfor %} 30 |
    31 | {% endfor %} 32 |
    33 | 34 | {% endblock %} 35 | 36 | {% block sidebar %} 37 | 38 | 53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # django-admin-refresh 2 | A refresh for the Django admin in... 2026? I hope? 3 | 4 | This is intended as a design refresh to merged into Django. 5 | It's under heavy development and isn't suitable for anything yet. 6 | 7 | ## Installation 8 | 9 | To try this out, you'll need a Django project. If you don't have one, 10 | I've been testing using my 11 | [django-admin-demo](https://github.com/knyghty/django-admin-demo) project. 12 | 13 | Install the package: 14 | 15 | ```bash 16 | pip install django-admin-refresh 17 | ``` 18 | 19 | The release on PyPI is likely to be out of date, so you may want to 20 | install the latest version from GitHub by cloning this repo and 21 | install it locally: `pip install -e /path/to/django-admin-refresh`. 22 | 23 | Then add `admin_refresh` it to your `INSTALLED_APPS` **above** 24 | `django.contrib.admin` and `django.contrib.admindocs` if using: 25 | 26 | ```python 27 | INSTALLED_APPS = [ 28 | "admin_refresh", 29 | "django.contrib.admindocs", 30 | "django.contrib.admin", 31 | ... 32 | ] 33 | ``` 34 | 35 | Now you can create yourself a supuerser as normal and log in to the admin site. 36 | 37 | ## Rationale 38 | 39 | The Django admin is one of Django's biggest selling points. 40 | It should be kept up to date with the latest advances in 41 | HTML and CSS in order to keep the framework relevant. 42 | 43 | The current admin wasn't designed with accessibility in mind, 44 | and the design is looking a bit dated. 45 | 46 | ## Goals 47 | 48 | - Refresh the admin with some nicer styling. 49 | - Remove unnecessary HTML elements - wrappers and so on. 50 | - Use semantic HTML. 51 | - Switch to CSS grid for layout. 52 | - Get as close to WCAG 2.1 AA as reasonably possible. 53 | - Make the admin more accessible in general. 54 | 55 | ## Constraints 56 | 57 | - We can't touch the views as long as this is a third party package. 58 | - It would be good to leave the translatable strings as untouched as possible. 59 | - Need to figure out if we can replace widgets. 60 | 61 | ## To decide 62 | 63 | - Is it worth changing any JS widgets? The time picker in particular feels a bit useless. 64 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin_doc/model_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block extrahead %} 5 | {{ block.super }} 6 | 10 | {% endblock %} 11 | 12 | {% block breadcrumbs %} 13 | 19 | {% endblock %} 20 | 21 | {% block title %}{% blocktranslate %}Model: {{ name }}{% endblocktranslate %}{% endblock %} 22 | 23 | {% block content %} 24 |
    25 |

    {{ name }}

    26 |

    {{ summary }}

    27 | 28 | {{ description }} 29 | 30 |

    {% translate 'Fields' %}

    31 |
    32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {% for field in fields|dictsort:"name" %} 42 | 43 | 44 | 45 | 46 | 47 | {% endfor %} 48 | 49 |
    {% translate 'Field' %}{% translate 'Type' %}{% translate 'Description' %}
    {{ field.name }}{{ field.data_type }}{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}
    50 |
    51 | 52 | {% if methods %} 53 |

    {% translate 'Methods with arguments' %}

    54 |
    55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | {% for method in methods|dictsort:"name" %} 65 | 66 | 67 | 68 | 69 | 70 | {% endfor %} 71 | 72 |
    {% translate 'Method' %}{% translate 'Arguments' %}{% translate 'Description' %}
    {{ method.name }}{{ method.arguments }}{{ method.verbose }}
    73 |
    74 | {% endif %} 75 | 76 |

    ‹ {% translate 'Back to Model documentation' %}

    77 |
    78 | {% endblock %} 79 | -------------------------------------------------------------------------------- /admin_refresh/templates/registration/password_change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | {% block extrastyle %}{{ block.super }}{% endblock %} 4 | {% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% translate 'Documentation' %} / {% endif %} {% translate 'Change password' %} / {% translate 'Log out' %}{% endblock %} 5 | {% block breadcrumbs %} 6 | 10 | {% endblock %} 11 | 12 | {% block content %}
    13 | 14 |
    {% csrf_token %} 15 |
    16 | {% if form.errors %} 17 |

    18 | {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} 19 |

    20 | {% endif %} 21 | 22 | 23 |

    {% translate '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.' %}

    24 | 25 |
    26 | 27 |
    28 | {{ form.old_password.errors }} 29 | {{ form.old_password.label_tag }} {{ form.old_password }} 30 |
    31 | 32 |
    33 | {{ form.new_password1.errors }} 34 | {{ form.new_password1.label_tag }} {{ form.new_password1 }} 35 | {% if form.new_password1.help_text %} 36 |
    {{ form.new_password1.help_text|safe }}
    37 | {% endif %} 38 |
    39 | 40 |
    41 | {{ form.new_password2.errors }} 42 | {{ form.new_password2.label_tag }} {{ form.new_password2 }} 43 | {% if form.new_password2.help_text %} 44 |
    {{ form.new_password2.help_text|safe }}
    45 | {% endif %} 46 |
    47 | 48 |
    49 | 50 |
    51 | 52 |
    53 | 54 |
    55 |
    56 | 57 | {% endblock %} 58 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/login.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | 4 | {% block extrastyle %}{{ block.super }} 5 | {{ form.media }} 6 | {% endblock %} 7 | 8 | {% block bodyclass %}{{ block.super }} login{% endblock %} 9 | 10 | {% block usertools %}{% endblock %} 11 | 12 | {% block nav-global %}{% endblock %} 13 | 14 | {% block nav-sidebar-toggle %}{% endblock %} 15 | {% block nav-sidebar %}{% endblock %} 16 | 17 | {% block content_title %}{% endblock %} 18 | 19 | {% block breadcrumbs %}{% endblock %} 20 | 21 | {% block content %} 22 | {% if form.errors and not form.non_field_errors %} 23 |

    24 | {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} 25 |

    26 | {% endif %} 27 | 28 | {% if form.non_field_errors %} 29 | {% for error in form.non_field_errors %} 30 |

    31 | {{ error }} 32 |

    33 | {% endfor %} 34 | {% endif %} 35 | 36 |
    37 | 38 | {% if user.is_authenticated %} 39 |

    40 | {% blocktranslate trimmed %} 41 | You are authenticated as {{ username }}, but are not authorized to 42 | access this page. Would you like to login to a different account? 43 | {% endblocktranslate %} 44 |

    45 | {% endif %} 46 | 47 |
    {% csrf_token %} 48 |
    49 | {{ form.username.errors }} 50 | {{ form.username.label_tag }} {{ form.username }} 51 |
    52 |
    53 | {{ form.password.errors }} 54 | {{ form.password.label_tag }} {{ form.password }} 55 | 56 |
    57 | {% url 'admin_password_reset' as password_reset_url %} 58 | {% if password_reset_url %} 59 | 62 | {% endif %} 63 |
    64 | 65 |
    66 |
    67 | 68 |
    69 | {% endblock %} 70 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/object_history.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n admin_urls %} 3 | 4 | {% block breadcrumbs %} 5 | 12 | {% endblock %} 13 | 14 | {% block content %} 15 |
    16 |
    17 | 18 | {% if action_list %} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% for action in action_list %} 29 | 30 | 31 | 32 | 33 | 34 | {% endfor %} 35 | 36 |
    {% translate 'Date/time' %}{% translate 'User' %}{% translate 'Action' %}
    {{ action.action_time|date:"DATETIME_FORMAT" }}{{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}{{ action.get_change_message }}
    37 |

    38 | {% if pagination_required %} 39 | {% for i in page_range %} 40 | {% if i == action_list.paginator.ELLIPSIS %} 41 | {{ action_list.paginator.ELLIPSIS }} 42 | {% elif i == action_list.number %} 43 | {{ i }} 44 | {% else %} 45 | {{ i }} 46 | {% endif %} 47 | {% endfor %} 48 | {% endif %} 49 | {{ action_list.paginator.count }} {% if action_list.paginator.count == 1 %}{% translate "entry" %}{% else %}{% translate "entries" %}{% endif %} 50 |

    51 | {% else %} 52 |

    {% translate 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %}

    53 | {% endif %} 54 |
    55 |
    56 | {% endblock %} 57 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/css/nav_sidebar.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --header-hamburger-highlight: #3e7d65; 3 | --nav-sidebar-bg: #fff; 4 | --nav-sidebar-color: #000; 5 | --nav-sidebar-active-row: #eee; 6 | 7 | --nav-sidebar-width: 19rem; 8 | } 9 | 10 | #toggle-nav-sidebar { 11 | cursor: pointer; 12 | border-radius: 50%; 13 | padding: 0.3rem; 14 | width: 2.5rem; 15 | height: 2.5rem; 16 | } 17 | 18 | #toggle-nav-sidebar:hover { 19 | background: var(--header-hamburger-highlight); 20 | } 21 | 22 | #hamburger { 23 | filter: invert(1); 24 | } 25 | 26 | #overlay { 27 | position: absolute; 28 | opacity: 0; 29 | top: 0; 30 | left: 0; 31 | width: 100%; 32 | height: 100%; 33 | background: rgba(0, 0, 0, .3); 34 | z-index: 100; 35 | visibility: hidden; 36 | transition: opacity .3s ease, visibility .3s ease; 37 | pointer-events: none; 38 | } 39 | 40 | #overlay.active { 41 | visibility: visible; 42 | opacity: 1; 43 | pointer-events: auto; 44 | } 45 | 46 | #nav-sidebar { 47 | background: var(--nav-sidebar-bg); 48 | position: fixed; 49 | top: var(--header-height); 50 | left: calc(0rem - var(--nav-sidebar-width)); 51 | transition: left 0.3s ease; 52 | z-index: 110; 53 | width: var(--nav-sidebar-width); 54 | overflow: auto; 55 | height: 100vh; 56 | } 57 | 58 | #nav-sidebar.opened { 59 | box-shadow: 60 | 0 8px 10px -5px rgba(0, 0, 0, .4), 61 | 0 16px 24px 2px rgba(0, 0, 0, .3), 62 | 0 8px 32px 6px rgba(0, 0, 0, .1); 63 | left: 0; 64 | } 65 | 66 | #nav-filter { 67 | padding: 1em; 68 | width: 100%; 69 | } 70 | 71 | #nav-sidebar section { 72 | margin: 1em 0 0 0; 73 | } 74 | 75 | #nav-sidebar header a { 76 | display: block; 77 | font-weight: bold; 78 | width: 100%; 79 | } 80 | 81 | #nav-sidebar ul { 82 | margin: 0; 83 | padding: 0; 84 | } 85 | 86 | #nav-sidebar li { 87 | display: flex; 88 | justify-content: space-between; 89 | list-style: none; 90 | } 91 | 92 | #nav-sidebar a { 93 | color: var(--nav-sidebar-color); 94 | padding: 0.75em 1em; 95 | text-decoration: none; 96 | } 97 | 98 | #nav-sidebar a:first-of-type { 99 | flex-grow: 1; 100 | } 101 | 102 | #nav-sidebar a:hover { 103 | background: var(--nav-sidebar-active-row); 104 | } 105 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/auth/user/change_password.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n static %} 3 | {% load admin_urls %} 4 | 5 | {% block extrastyle %}{{ block.super }}{% endblock %} 6 | {% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %} 7 | {% if not is_popup %} 8 | {% block breadcrumbs %} 9 | 16 | {% endblock %} 17 | {% endif %} 18 | {% block content %}
    19 | {% csrf_token %}{% block form_top %}{% endblock %} 20 | 21 |
    22 | {% if is_popup %}{% endif %} 23 | {% if form.errors %} 24 |

    25 | {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} 26 |

    27 | {% endif %} 28 | 29 |

    {% blocktranslate with username=original %}Enter a new password for the user {{ username }}.{% endblocktranslate %}

    30 | 31 |
    32 | 33 |
    34 | {{ form.password1.errors }} 35 | {{ form.password1.label_tag }} {{ form.password1 }} 36 | {% if form.password1.help_text %} 37 |
    {{ form.password1.help_text|safe }}
    38 | {% endif %} 39 |
    40 | 41 |
    42 | {{ form.password2.errors }} 43 | {{ form.password2.label_tag }} {{ form.password2 }} 44 | {% if form.password2.help_text %} 45 |
    {{ form.password2.help_text|safe }}
    46 | {% endif %} 47 |
    48 | 49 |
    50 | 51 |
    52 | 53 |
    54 | 55 |
    56 |
    57 | {% endblock %} 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | node_modules/ 132 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/delete_selected_confirmation.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n l10n admin_urls static %} 3 | 4 | {% block extrahead %} 5 | {{ block.super }} 6 | {{ media }} 7 | 8 | {% endblock %} 9 | 10 | {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %} 11 | 12 | {% block breadcrumbs %} 13 | 19 | {% endblock %} 20 | 21 | {% block content %} 22 | {% if perms_lacking %} 23 |

    {% blocktranslate %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}

    24 | 29 | {% elif protected %} 30 |

    {% blocktranslate %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktranslate %}

    31 | 36 | {% else %} 37 |

    {% blocktranslate %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktranslate %}

    38 | {% include "admin/includes/object_delete_summary.html" %} 39 |

    {% translate "Objects" %}

    40 | {% for deletable_object in deletable_objects %} 41 | 42 | {% endfor %} 43 |
    {% csrf_token %} 44 |
    45 | {% for obj in queryset %} 46 | 47 | {% endfor %} 48 | 49 | 50 | 51 | {% translate "No, take me back" %} 52 |
    53 |
    54 | {% endif %} 55 | {% endblock %} 56 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/delete_confirmation.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n admin_urls static %} 3 | 4 | {% block extrahead %} 5 | {{ block.super }} 6 | {{ media }} 7 | 8 | {% endblock %} 9 | 10 | {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %} 11 | 12 | {% block breadcrumbs %} 13 | 20 | {% endblock %} 21 | 22 | {% block content %} 23 | {% if perms_lacking %} 24 |

    {% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}

    25 | 30 | {% elif protected %} 31 |

    {% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}

    32 | 37 | {% else %} 38 |

    {% blocktranslate with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktranslate %}

    39 | {% include "admin/includes/object_delete_summary.html" %} 40 |

    {% translate "Objects" %}

    41 | 42 |
    {% csrf_token %} 43 |
    44 | 45 | {% if is_popup %}{% endif %} 46 | {% if to_field %}{% endif %} 47 | 48 | {% translate "No, take me back" %} 49 |
    50 |
    51 | {% endif %} 52 | {% endblock %} 53 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/edit_inline/stacked.html: -------------------------------------------------------------------------------- 1 | {% load i18n admin_urls %} 2 |
    6 |
    7 | {% if inline_admin_formset.formset.max_num == 1 %} 8 |

    {{ inline_admin_formset.opts.verbose_name|capfirst }}

    9 | {% else %} 10 |

    {{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

    11 | {% endif %} 12 | {{ inline_admin_formset.formset.management_form }} 13 | {{ inline_admin_formset.formset.non_form_errors }} 14 | 15 | {% for inline_admin_form in inline_admin_formset %}
    16 |

    {{ inline_admin_formset.opts.verbose_name|capfirst }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} {% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}{% endif %} 17 | {% else %}#{{ forloop.counter }}{% endif %} 18 | {% if inline_admin_form.show_url %}{% translate "View on site" %}{% endif %} 19 | {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}{% endif %} 20 |

    21 | {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} 22 | {% for fieldset in inline_admin_form %} 23 | {% include "admin/includes/fieldset.html" %} 24 | {% endfor %} 25 | {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} 26 | {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %} 27 |
    {% endfor %} 28 |
    29 |
    30 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n admin_urls static admin_modify %} 3 | 4 | {% block extrahead %}{{ block.super }} 5 | 6 | {{ media }} 7 | {% endblock %} 8 | 9 | {% block extrastyle %}{{ block.super }}{% endblock %} 10 | 11 | {% block coltype %}colM{% endblock %} 12 | 13 | {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %} 14 | 15 | {% if not is_popup %} 16 | {% block breadcrumbs %} 17 | 23 | {% endblock %} 24 | {% endif %} 25 | 26 | {% block content %}
    27 | {% block object-tools %} 28 | {% if change %}{% if not is_popup %} 29 | 34 | {% endif %}{% endif %} 35 | {% endblock %} 36 |
    {% csrf_token %}{% block form_top %}{% endblock %} 37 |
    38 | {% if is_popup %}{% endif %} 39 | {% if to_field %}{% endif %} 40 | {% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} 41 | {% if errors %} 42 |

    43 | {% if errors|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} 44 |

    45 | {{ adminform.form.non_field_errors }} 46 | {% endif %} 47 | 48 | {% block field_sets %} 49 | {% for fieldset in adminform %} 50 | {% include "admin/includes/fieldset.html" %} 51 | {% endfor %} 52 | {% endblock %} 53 | 54 | {% block after_field_sets %}{% endblock %} 55 | 56 | {% block inline_field_sets %} 57 | {% for inline_admin_formset in inline_admin_formsets %} 58 | {% include inline_admin_formset.opts.template %} 59 | {% endfor %} 60 | {% endblock %} 61 | 62 | {% block after_related_objects %}{% endblock %} 63 | 64 | {% block submit_buttons_bottom %}{% submit_row %}{% endblock %} 65 | 66 | {% block admin_change_form_document_ready %} 67 | 74 | {% endblock %} 75 | 76 | {# JavaScript for prepopulated fields #} 77 | {% prepopulated_fields_js %} 78 | 79 |
    80 |
    81 | {% endblock %} 82 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/change_list.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n admin_urls static admin_list %} 3 | 4 | {% block extrastyle %} 5 | {{ block.super }} 6 | 7 | {% if cl.formset %} 8 | 9 | {% endif %} 10 | {% if cl.formset or action_form %} 11 | 12 | {% endif %} 13 | {{ media.css }} 14 | {% if not actions_on_top and not actions_on_bottom %} 15 | 18 | {% endif %} 19 | {% endblock %} 20 | 21 | {% block extrahead %} 22 | {{ block.super }} 23 | {{ media.js }} 24 | {% endblock %} 25 | 26 | {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %} 27 | 28 | {% if not is_popup %} 29 | {% block breadcrumbs %} 30 | 35 | {% endblock %} 36 | {% endif %} 37 | 38 | {% block coltype %}{% endblock %} 39 | 40 | {% block content %} 41 |
    42 | {% block object-tools %} 43 | 48 | {% endblock %} 49 | {% if cl.formset and cl.formset.errors %} 50 |

    51 | {% if cl.formset.total_error_count == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} 52 |

    53 | {{ cl.formset.non_form_errors }} 54 | {% endif %} 55 |
    56 |
    57 | {% block search %}{% search_form cl %}{% endblock %} 58 | {% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %} 59 | 60 |
    {% csrf_token %} 61 | {% if cl.formset %} 62 |
    {{ cl.formset.management_form }}
    63 | {% endif %} 64 | 65 | {% block result_list %} 66 | {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} 67 | {% result_list cl %} 68 | {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} 69 | {% endblock %} 70 | {% block pagination %}{% pagination cl %}{% endblock %} 71 |
    72 |
    73 | {% block filters %} 74 | {% if cl.has_filters %} 75 |
    76 |

    {% translate 'Filter' %}

    77 | {% if cl.has_active_filters %}

    78 | ✖ {% translate "Clear all filters" %} 79 |

    {% endif %} 80 | {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} 81 |
    82 | {% endif %} 83 | {% endblock %} 84 |
    85 |
    86 | {% endblock %} 87 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/nav_sidebar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const toggleNavSidebar = document.getElementById('toggle-nav-sidebar'); 4 | if (toggleNavSidebar !== null) { 5 | const overlay = document.getElementById('overlay'); 6 | const navLinks = document.querySelectorAll('#nav-sidebar a'); 7 | const mainLinks = document.querySelectorAll('#main-container a'); 8 | function disableNavLinkTabbing() { 9 | for (const navLink of navLinks) { 10 | navLink.tabIndex = -1; 11 | } 12 | } 13 | function enableNavLinkTabbing() { 14 | for (const navLink of navLinks) { 15 | navLink.tabIndex = 0; 16 | } 17 | } 18 | function enableMainLinkTabbing() { 19 | for (const mainLink of mainLinks) { 20 | mainLink.tabIndex = 0; 21 | } 22 | } 23 | function disableMainLinkTabbing() { 24 | for (const mainLink of mainLinks) { 25 | mainLink.tabIndex = -1; 26 | } 27 | } 28 | 29 | toggleNavSidebar.addEventListener('click', function() { 30 | const navSidebar = document.getElementById('nav-sidebar'); 31 | navSidebar.classList.toggle('opened'); 32 | overlay.classList.toggle('active'); 33 | if (navSidebar.classList.contains('opened')) { 34 | enableNavLinkTabbing(); 35 | disableMainLinkTabbing(); 36 | } else { 37 | disableNavLinkTabbing(); 38 | enableMainLinkTabbing(); 39 | } 40 | }); 41 | overlay.addEventListener('click', function() { 42 | const navSidebar = document.getElementById('nav-sidebar'); 43 | navSidebar.classList.remove('opened'); 44 | overlay.classList.remove('active'); 45 | }); 46 | 47 | } 48 | 49 | function initSidebarQuickFilter() { 50 | const options = []; 51 | const navSidebar = document.getElementById('nav-sidebar'); 52 | if (!navSidebar) { 53 | return; 54 | } 55 | navSidebar.querySelectorAll('li a:first-of-type').forEach((container) => { 56 | options.push({title: container.innerHTML, node: container}); 57 | }); 58 | 59 | function checkValue(event) { 60 | let filterValue = event.target.value; 61 | if (filterValue) { 62 | filterValue = filterValue.toLowerCase(); 63 | } 64 | if (event.key === 'Escape') { 65 | filterValue = ''; 66 | event.target.value = ''; // clear input 67 | } 68 | let matches = false; 69 | for (const o of options) { 70 | let displayValue = ''; 71 | if (filterValue) { 72 | if (o.title.toLowerCase().indexOf(filterValue) === -1) { 73 | displayValue = 'none'; 74 | } else { 75 | matches = true; 76 | } 77 | } 78 | // show/hide parent
  • 79 | o.node.parentNode.style.display = displayValue; 80 | } 81 | if (!filterValue || matches) { 82 | event.target.classList.remove('no-results'); 83 | } else { 84 | event.target.classList.add('no-results'); 85 | } 86 | sessionStorage.setItem('django.admin.navSidebarFilterValue', filterValue); 87 | } 88 | 89 | const nav = document.getElementById('nav-filter'); 90 | nav.addEventListener('change', checkValue, false); 91 | nav.addEventListener('input', checkValue, false); 92 | nav.addEventListener('keyup', checkValue, false); 93 | 94 | const storedValue = sessionStorage.getItem('django.admin.navSidebarFilterValue'); 95 | if (storedValue) { 96 | nav.value = storedValue; 97 | checkValue({target: nav, key: ''}); 98 | } 99 | } 100 | window.initSidebarQuickFilter = initSidebarQuickFilter; 101 | initSidebarQuickFilter(); 102 | } 103 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/edit_inline/tabular.html: -------------------------------------------------------------------------------- 1 | {% load i18n admin_urls static admin_modify %} 2 |
    5 | 66 |
    67 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/css/base.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | :root { 6 | --body-bg: #fff; 7 | 8 | --header-bg: #0c4b33; 9 | --header-color: #fff; 10 | --header-height: 3.3rem; 11 | 12 | --sidebar-bg: #f2f2f2; 13 | 14 | --table-caption-bg: #126f4c; 15 | --table-caption-color: #fff; 16 | --table-stripe-bg: #f2f2f2; 17 | 18 | --icon-add: url(../img/icon-addlink.svg); 19 | --icon-change: url(../img/icon-changelink.svg); 20 | --icon-delete: url(../img/icon-deletelink.svg); 21 | } 22 | 23 | html { 24 | height: 100%; 25 | } 26 | 27 | body { 28 | background: var(--body-bg); 29 | font-family: system-ui, sans-serif; 30 | height: 100%; 31 | margin: 0; 32 | } 33 | 34 | h1 { 35 | font-size: 1.75em; 36 | margin: 0 0 1em; 37 | } 38 | 39 | h2 { 40 | font-size: 1.5em; 41 | margin: 0; 42 | } 43 | 44 | h3 { 45 | font-size: 1.25em; 46 | } 47 | 48 | ul { 49 | list-style: none; 50 | margin: 0; 51 | padding: 0; 52 | } 53 | 54 | small { 55 | font-size: .8em; 56 | } 57 | 58 | .btn-unstyled { 59 | background: transparent; 60 | border: 0; 61 | color: inherit; 62 | font-family: inherit; 63 | font-size: 1em; 64 | } 65 | 66 | .caret { 67 | font-size: .8em; 68 | } 69 | 70 | .dropdown { 71 | position: relative; 72 | } 73 | 74 | .dropdown-toggle { 75 | cursor: pointer; 76 | } 77 | 78 | .dropdown-menu { 79 | background: var(--body-bg); 80 | border-radius: .25em; 81 | box-shadow: 0 .15em .25em rgba(0, 0, 0, 0.25); 82 | left: -100%; 83 | list-style: none; 84 | padding: .5em 0; 85 | position: absolute; 86 | top: calc(100% - 0.25rem); 87 | visibility: hidden; 88 | } 89 | 90 | .dropdown-menu li { 91 | padding: .25em .5em; 92 | } 93 | 94 | .dropdown:focus-within .dropdown-menu { 95 | visibility: visible; 96 | } 97 | 98 | #header { 99 | align-items: center; 100 | background: var(--header-bg); 101 | box-shadow: 102 | 0 3px 3px 0 rgba(0, 0, 0, .2), 103 | 0 3px 3px -2px rgba(0, 0, 0, .15), 104 | 0 1px 8px 0 rgba(0, 0, 0, .1); 105 | color: var(--header-color); 106 | display: flex; 107 | height: var(--header-height); 108 | justify-content: space-between; 109 | padding: 0 1rem; 110 | position: fixed; 111 | top: 0; 112 | width: 100%; 113 | z-index: 120; 114 | } 115 | 116 | #branding { 117 | font-size: 1.25em; 118 | } 119 | 120 | #branding a { 121 | color: var(--header-color); 122 | } 123 | 124 | #main-container { 125 | min-height: calc(100vh - var(--header-height)); 126 | position: relative; 127 | top: var(--header-height); 128 | } 129 | 130 | main { 131 | padding: 2em; 132 | } 133 | 134 | #content { 135 | column-gap: 1em; 136 | display: grid; 137 | } 138 | 139 | #content.with-sidebar { 140 | grid-template-columns: 3fr 1fr; 141 | grid-template-areas: 142 | "main sidebar"; 143 | } 144 | 145 | #content-main { 146 | grid-area: main; 147 | } 148 | 149 | #content-related { 150 | grid-area: sidebar; 151 | } 152 | 153 | .striped tr:nth-child(even) { 154 | background: var(--table-stripe-bg); 155 | } 156 | 157 | th.fill-space { 158 | width: 100%; 159 | } 160 | 161 | .addlink { 162 | background: var(--icon-add) 0 1px no-repeat; 163 | padding-left: 1em; 164 | } 165 | 166 | .changelink { 167 | background: var(--icon-change) 0 1px no-repeat; 168 | padding-left: 1em; 169 | } 170 | 171 | .deletelink { 172 | background: var(--icon-delete) 0 1px no-repeat; 173 | padding-left: 1em; 174 | } 175 | 176 | .module { 177 | margin-bottom: 2em; 178 | } 179 | 180 | .module a { 181 | color: blue; 182 | text-decoration: none; 183 | } 184 | 185 | .module a:hover, .module a:focus , .module a:active { 186 | text-decoration: underline; 187 | } 188 | 189 | .module table { 190 | border-collapse: collapse; 191 | text-align: left; 192 | width: 100%; 193 | } 194 | 195 | .module caption { 196 | background: var(--table-caption-bg); 197 | padding: .5em; 198 | } 199 | 200 | .module caption a { 201 | color: var(--table-caption-color); 202 | } 203 | 204 | .module th, .module td { 205 | padding: .5em; 206 | } 207 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/SelectBox.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const SelectBox = { 4 | cache: {}, 5 | init: function(id) { 6 | const box = document.getElementById(id); 7 | SelectBox.cache[id] = []; 8 | const cache = SelectBox.cache[id]; 9 | for (const node of box.options) { 10 | cache.push({value: node.value, text: node.text, displayed: 1}); 11 | } 12 | }, 13 | redisplay: function(id) { 14 | // Repopulate HTML select box from cache 15 | const box = document.getElementById(id); 16 | const scroll_value_from_top = box.scrollTop; 17 | box.innerHTML = ''; 18 | for (const node of SelectBox.cache[id]) { 19 | if (node.displayed) { 20 | const new_option = new Option(node.text, node.value, false, false); 21 | // Shows a tooltip when hovering over the option 22 | new_option.title = node.text; 23 | box.appendChild(new_option); 24 | } 25 | } 26 | box.scrollTop = scroll_value_from_top; 27 | }, 28 | filter: function(id, text) { 29 | // Redisplay the HTML select box, displaying only the choices containing ALL 30 | // the words in text. (It's an AND search.) 31 | const tokens = text.toLowerCase().split(/\s+/); 32 | for (const node of SelectBox.cache[id]) { 33 | node.displayed = 1; 34 | const node_text = node.text.toLowerCase(); 35 | for (const token of tokens) { 36 | if (!node_text.includes(token)) { 37 | node.displayed = 0; 38 | break; // Once the first token isn't found we're done 39 | } 40 | } 41 | } 42 | SelectBox.redisplay(id); 43 | }, 44 | delete_from_cache: function(id, value) { 45 | let delete_index = null; 46 | const cache = SelectBox.cache[id]; 47 | for (const [i, node] of cache.entries()) { 48 | if (node.value === value) { 49 | delete_index = i; 50 | break; 51 | } 52 | } 53 | cache.splice(delete_index, 1); 54 | }, 55 | add_to_cache: function(id, option) { 56 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 57 | }, 58 | cache_contains: function(id, value) { 59 | // Check if an item is contained in the cache 60 | for (const node of SelectBox.cache[id]) { 61 | if (node.value === value) { 62 | return true; 63 | } 64 | } 65 | return false; 66 | }, 67 | move: function(from, to) { 68 | const from_box = document.getElementById(from); 69 | for (const option of from_box.options) { 70 | const option_value = option.value; 71 | if (option.selected && SelectBox.cache_contains(from, option_value)) { 72 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 73 | SelectBox.delete_from_cache(from, option_value); 74 | } 75 | } 76 | SelectBox.redisplay(from); 77 | SelectBox.redisplay(to); 78 | }, 79 | move_all: function(from, to) { 80 | const from_box = document.getElementById(from); 81 | for (const option of from_box.options) { 82 | const option_value = option.value; 83 | if (SelectBox.cache_contains(from, option_value)) { 84 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 85 | SelectBox.delete_from_cache(from, option_value); 86 | } 87 | } 88 | SelectBox.redisplay(from); 89 | SelectBox.redisplay(to); 90 | }, 91 | sort: function(id) { 92 | SelectBox.cache[id].sort(function(a, b) { 93 | a = a.text.toLowerCase(); 94 | b = b.text.toLowerCase(); 95 | if (a > b) { 96 | return 1; 97 | } 98 | if (a < b) { 99 | return -1; 100 | } 101 | return 0; 102 | } ); 103 | }, 104 | select_all: function(id) { 105 | const box = document.getElementById(id); 106 | for (const option of box.options) { 107 | option.selected = true; 108 | } 109 | } 110 | }; 111 | window.SelectBox = SelectBox; 112 | } 113 | -------------------------------------------------------------------------------- /admin_refresh/templates/admin/base.html: -------------------------------------------------------------------------------- 1 | {% load i18n static %} 2 | {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} 3 | 4 | 5 | {% block title %}{% endblock %} 6 | 7 | {% block dark-mode-vars %} 8 | 9 | {% endblock %} 10 | {% if not is_popup and is_nav_sidebar_enabled %} 11 | 12 | 13 | {% endif %} 14 | {% block extrastyle %}{% endblock %} 15 | {% if LANGUAGE_BIDI %} 16 | 17 | {% endif %} 18 | {% block extrahead %}{% endblock %} 19 | {% block responsive %} 20 | 21 | 22 | {% if LANGUAGE_BIDI %} 23 | 24 | {% endif %} 25 | {% endblock %} 26 | {% block blockbots %}{% endblock %} 27 | 31 | {% if not is_popup %} 32 | {% block header %} 33 | 83 | {% endblock header %} 84 | {% endif %} 85 | 86 | {% if not is_popup %} 87 | {% if is_nav_sidebar_enabled %} 88 | {% block nav-sidebar %} 89 | {% include "admin/nav_sidebar.html" %} 90 | {% endblock %} 91 | {% endif %} 92 | {% endif %} 93 | 94 |
    95 |
    96 | {% if not is_popup %} 97 | {% block breadcrumbs %} 98 | 102 | {% endblock %} 103 | {% endif %} 104 | 105 |
    106 | {% block messages %} 107 | {% if messages %} 108 |
      109 | {% for message in messages %} 110 | {{ message|capfirst }} 111 | {% endfor %} 112 |
    113 | {% endif %} 114 | {% endblock messages %} 115 | {% block pretitle %}{% endblock %} 116 | {% block content_title %}{% if title %}

    {{ title }}

    {% endif %}{% endblock %} 117 | {% block content_subtitle %}{% if subtitle %}

    {{ subtitle }}

    {% endif %}{% endblock %} 118 | {% block object-tools %}{% endblock %} 119 |
    120 | {% block content %}{% endblock %} 121 | {{ content }} 122 | {% block sidebar %}{% endblock %} 123 |
    124 |
    125 | {% block footer %}
    {% endblock %} 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/core.js: -------------------------------------------------------------------------------- 1 | // Core JavaScript helper functions 2 | 'use strict'; 3 | 4 | // quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]); 5 | function quickElement() { 6 | const obj = document.createElement(arguments[0]); 7 | if (arguments[2]) { 8 | const textNode = document.createTextNode(arguments[2]); 9 | obj.appendChild(textNode); 10 | } 11 | const len = arguments.length; 12 | for (let i = 3; i < len; i += 2) { 13 | obj.setAttribute(arguments[i], arguments[i + 1]); 14 | } 15 | arguments[1].appendChild(obj); 16 | return obj; 17 | } 18 | 19 | // "a" is reference to an object 20 | function removeChildren(a) { 21 | while (a.hasChildNodes()) { 22 | a.removeChild(a.lastChild); 23 | } 24 | } 25 | 26 | // ---------------------------------------------------------------------------- 27 | // Find-position functions by PPK 28 | // See https://www.quirksmode.org/js/findpos.html 29 | // ---------------------------------------------------------------------------- 30 | function findPosX(obj) { 31 | let curleft = 0; 32 | if (obj.offsetParent) { 33 | while (obj.offsetParent) { 34 | curleft += obj.offsetLeft - obj.scrollLeft; 35 | obj = obj.offsetParent; 36 | } 37 | } else if (obj.x) { 38 | curleft += obj.x; 39 | } 40 | return curleft; 41 | } 42 | 43 | function findPosY(obj) { 44 | let curtop = 0; 45 | if (obj.offsetParent) { 46 | while (obj.offsetParent) { 47 | curtop += obj.offsetTop - obj.scrollTop; 48 | obj = obj.offsetParent; 49 | } 50 | } else if (obj.y) { 51 | curtop += obj.y; 52 | } 53 | return curtop; 54 | } 55 | 56 | //----------------------------------------------------------------------------- 57 | // Date object extensions 58 | // ---------------------------------------------------------------------------- 59 | { 60 | Date.prototype.getTwelveHours = function() { 61 | return this.getHours() % 12 || 12; 62 | }; 63 | 64 | Date.prototype.getTwoDigitMonth = function() { 65 | return (this.getMonth() < 9) ? '0' + (this.getMonth() + 1) : (this.getMonth() + 1); 66 | }; 67 | 68 | Date.prototype.getTwoDigitDate = function() { 69 | return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate(); 70 | }; 71 | 72 | Date.prototype.getTwoDigitTwelveHour = function() { 73 | return (this.getTwelveHours() < 10) ? '0' + this.getTwelveHours() : this.getTwelveHours(); 74 | }; 75 | 76 | Date.prototype.getTwoDigitHour = function() { 77 | return (this.getHours() < 10) ? '0' + this.getHours() : this.getHours(); 78 | }; 79 | 80 | Date.prototype.getTwoDigitMinute = function() { 81 | return (this.getMinutes() < 10) ? '0' + this.getMinutes() : this.getMinutes(); 82 | }; 83 | 84 | Date.prototype.getTwoDigitSecond = function() { 85 | return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds(); 86 | }; 87 | 88 | Date.prototype.getAbbrevMonthName = function() { 89 | return typeof window.CalendarNamespace === "undefined" 90 | ? this.getTwoDigitMonth() 91 | : window.CalendarNamespace.monthsOfYearAbbrev[this.getMonth()]; 92 | }; 93 | 94 | Date.prototype.getFullMonthName = function() { 95 | return typeof window.CalendarNamespace === "undefined" 96 | ? this.getTwoDigitMonth() 97 | : window.CalendarNamespace.monthsOfYear[this.getMonth()]; 98 | }; 99 | 100 | Date.prototype.strftime = function(format) { 101 | const fields = { 102 | b: this.getAbbrevMonthName(), 103 | B: this.getFullMonthName(), 104 | c: this.toString(), 105 | d: this.getTwoDigitDate(), 106 | H: this.getTwoDigitHour(), 107 | I: this.getTwoDigitTwelveHour(), 108 | m: this.getTwoDigitMonth(), 109 | M: this.getTwoDigitMinute(), 110 | p: (this.getHours() >= 12) ? 'PM' : 'AM', 111 | S: this.getTwoDigitSecond(), 112 | w: '0' + this.getDay(), 113 | x: this.toLocaleDateString(), 114 | X: this.toLocaleTimeString(), 115 | y: ('' + this.getFullYear()).substr(2, 4), 116 | Y: '' + this.getFullYear(), 117 | '%': '%' 118 | }; 119 | let result = '', i = 0; 120 | while (i < format.length) { 121 | if (format.charAt(i) === '%') { 122 | result = result + fields[format.charAt(i + 1)]; 123 | ++i; 124 | } 125 | else { 126 | result = result + format.charAt(i); 127 | } 128 | ++i; 129 | } 130 | return result; 131 | }; 132 | 133 | // ---------------------------------------------------------------------------- 134 | // String object extensions 135 | // ---------------------------------------------------------------------------- 136 | String.prototype.strptime = function(format) { 137 | const split_format = format.split(/[.\-/]/); 138 | const date = this.split(/[.\-/]/); 139 | let i = 0; 140 | let day, month, year; 141 | while (i < split_format.length) { 142 | switch (split_format[i]) { 143 | case "%d": 144 | day = date[i]; 145 | break; 146 | case "%m": 147 | month = date[i] - 1; 148 | break; 149 | case "%Y": 150 | year = date[i]; 151 | break; 152 | case "%y": 153 | // A %y value in the range of [00, 68] is in the current 154 | // century, while [69, 99] is in the previous century, 155 | // according to the Open Group Specification. 156 | if (parseInt(date[i], 10) >= 69) { 157 | year = date[i]; 158 | } else { 159 | year = (new Date(Date.UTC(date[i], 0))).getUTCFullYear() + 100; 160 | } 161 | break; 162 | } 163 | ++i; 164 | } 165 | // Create Date object from UTC since the parsed value is supposed to be 166 | // in UTC, not local time. Also, the calendar uses UTC functions for 167 | // date extraction. 168 | return new Date(Date.UTC(year, month, day)); 169 | }; 170 | } 171 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/urlify.js: -------------------------------------------------------------------------------- 1 | /*global XRegExp*/ 2 | 'use strict'; 3 | { 4 | const LATIN_MAP = { 5 | 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 6 | 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 7 | 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 8 | 'Õ': 'O', 'Ö': 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 9 | 'Ü': 'U', 'Ű': 'U', 'Ý': 'Y', 'Þ': 'TH', 'Ÿ': 'Y', 'ß': 'ss', 'à': 'a', 10 | 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 11 | 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i', 12 | 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 13 | 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ü': 'u', 14 | 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y' 15 | }; 16 | const LATIN_SYMBOLS_MAP = { 17 | '©': '(c)' 18 | }; 19 | const GREEK_MAP = { 20 | 'α': 'a', 'β': 'b', 'γ': 'g', 'δ': 'd', 'ε': 'e', 'ζ': 'z', 'η': 'h', 21 | 'θ': '8', 'ι': 'i', 'κ': 'k', 'λ': 'l', 'μ': 'm', 'ν': 'n', 'ξ': '3', 22 | 'ο': 'o', 'π': 'p', 'ρ': 'r', 'σ': 's', 'τ': 't', 'υ': 'y', 'φ': 'f', 23 | 'χ': 'x', 'ψ': 'ps', 'ω': 'w', 'ά': 'a', 'έ': 'e', 'ί': 'i', 'ό': 'o', 24 | 'ύ': 'y', 'ή': 'h', 'ώ': 'w', 'ς': 's', 'ϊ': 'i', 'ΰ': 'y', 'ϋ': 'y', 25 | 'ΐ': 'i', 'Α': 'A', 'Β': 'B', 'Γ': 'G', 'Δ': 'D', 'Ε': 'E', 'Ζ': 'Z', 26 | 'Η': 'H', 'Θ': '8', 'Ι': 'I', 'Κ': 'K', 'Λ': 'L', 'Μ': 'M', 'Ν': 'N', 27 | 'Ξ': '3', 'Ο': 'O', 'Π': 'P', 'Ρ': 'R', 'Σ': 'S', 'Τ': 'T', 'Υ': 'Y', 28 | 'Φ': 'F', 'Χ': 'X', 'Ψ': 'PS', 'Ω': 'W', 'Ά': 'A', 'Έ': 'E', 'Ί': 'I', 29 | 'Ό': 'O', 'Ύ': 'Y', 'Ή': 'H', 'Ώ': 'W', 'Ϊ': 'I', 'Ϋ': 'Y' 30 | }; 31 | const TURKISH_MAP = { 32 | 'ş': 's', 'Ş': 'S', 'ı': 'i', 'İ': 'I', 'ç': 'c', 'Ç': 'C', 'ü': 'u', 33 | 'Ü': 'U', 'ö': 'o', 'Ö': 'O', 'ğ': 'g', 'Ğ': 'G' 34 | }; 35 | const ROMANIAN_MAP = { 36 | 'ă': 'a', 'î': 'i', 'ș': 's', 'ț': 't', 'â': 'a', 37 | 'Ă': 'A', 'Î': 'I', 'Ș': 'S', 'Ț': 'T', 'Â': 'A' 38 | }; 39 | const RUSSIAN_MAP = { 40 | 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', 'е': 'e', 'ё': 'yo', 41 | 'ж': 'zh', 'з': 'z', 'и': 'i', 'й': 'j', 'к': 'k', 'л': 'l', 'м': 'm', 42 | 'н': 'n', 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', 43 | 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', 'щ': 'sh', 'ъ': '', 44 | 'ы': 'y', 'ь': '', 'э': 'e', 'ю': 'yu', 'я': 'ya', 45 | 'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D', 'Е': 'E', 'Ё': 'Yo', 46 | 'Ж': 'Zh', 'З': 'Z', 'И': 'I', 'Й': 'J', 'К': 'K', 'Л': 'L', 'М': 'M', 47 | 'Н': 'N', 'О': 'O', 'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T', 'У': 'U', 48 | 'Ф': 'F', 'Х': 'H', 'Ц': 'C', 'Ч': 'Ch', 'Ш': 'Sh', 'Щ': 'Sh', 'Ъ': '', 49 | 'Ы': 'Y', 'Ь': '', 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya' 50 | }; 51 | const UKRAINIAN_MAP = { 52 | 'Є': 'Ye', 'І': 'I', 'Ї': 'Yi', 'Ґ': 'G', 'є': 'ye', 'і': 'i', 53 | 'ї': 'yi', 'ґ': 'g' 54 | }; 55 | const CZECH_MAP = { 56 | 'č': 'c', 'ď': 'd', 'ě': 'e', 'ň': 'n', 'ř': 'r', 'š': 's', 'ť': 't', 57 | 'ů': 'u', 'ž': 'z', 'Č': 'C', 'Ď': 'D', 'Ě': 'E', 'Ň': 'N', 'Ř': 'R', 58 | 'Š': 'S', 'Ť': 'T', 'Ů': 'U', 'Ž': 'Z' 59 | }; 60 | const SLOVAK_MAP = { 61 | 'á': 'a', 'ä': 'a', 'č': 'c', 'ď': 'd', 'é': 'e', 'í': 'i', 'ľ': 'l', 62 | 'ĺ': 'l', 'ň': 'n', 'ó': 'o', 'ô': 'o', 'ŕ': 'r', 'š': 's', 'ť': 't', 63 | 'ú': 'u', 'ý': 'y', 'ž': 'z', 64 | 'Á': 'a', 'Ä': 'A', 'Č': 'C', 'Ď': 'D', 'É': 'E', 'Í': 'I', 'Ľ': 'L', 65 | 'Ĺ': 'L', 'Ň': 'N', 'Ó': 'O', 'Ô': 'O', 'Ŕ': 'R', 'Š': 'S', 'Ť': 'T', 66 | 'Ú': 'U', 'Ý': 'Y', 'Ž': 'Z' 67 | }; 68 | const POLISH_MAP = { 69 | 'ą': 'a', 'ć': 'c', 'ę': 'e', 'ł': 'l', 'ń': 'n', 'ó': 'o', 'ś': 's', 70 | 'ź': 'z', 'ż': 'z', 71 | 'Ą': 'A', 'Ć': 'C', 'Ę': 'E', 'Ł': 'L', 'Ń': 'N', 'Ó': 'O', 'Ś': 'S', 72 | 'Ź': 'Z', 'Ż': 'Z' 73 | }; 74 | const LATVIAN_MAP = { 75 | 'ā': 'a', 'č': 'c', 'ē': 'e', 'ģ': 'g', 'ī': 'i', 'ķ': 'k', 'ļ': 'l', 76 | 'ņ': 'n', 'š': 's', 'ū': 'u', 'ž': 'z', 77 | 'Ā': 'A', 'Č': 'C', 'Ē': 'E', 'Ģ': 'G', 'Ī': 'I', 'Ķ': 'K', 'Ļ': 'L', 78 | 'Ņ': 'N', 'Š': 'S', 'Ū': 'U', 'Ž': 'Z' 79 | }; 80 | const ARABIC_MAP = { 81 | 'أ': 'a', 'ب': 'b', 'ت': 't', 'ث': 'th', 'ج': 'g', 'ح': 'h', 'خ': 'kh', 'د': 'd', 82 | 'ذ': 'th', 'ر': 'r', 'ز': 'z', 'س': 's', 'ش': 'sh', 'ص': 's', 'ض': 'd', 'ط': 't', 83 | 'ظ': 'th', 'ع': 'aa', 'غ': 'gh', 'ف': 'f', 'ق': 'k', 'ك': 'k', 'ل': 'l', 'م': 'm', 84 | 'ن': 'n', 'ه': 'h', 'و': 'o', 'ي': 'y' 85 | }; 86 | const LITHUANIAN_MAP = { 87 | 'ą': 'a', 'č': 'c', 'ę': 'e', 'ė': 'e', 'į': 'i', 'š': 's', 'ų': 'u', 88 | 'ū': 'u', 'ž': 'z', 89 | 'Ą': 'A', 'Č': 'C', 'Ę': 'E', 'Ė': 'E', 'Į': 'I', 'Š': 'S', 'Ų': 'U', 90 | 'Ū': 'U', 'Ž': 'Z' 91 | }; 92 | const SERBIAN_MAP = { 93 | 'ђ': 'dj', 'ј': 'j', 'љ': 'lj', 'њ': 'nj', 'ћ': 'c', 'џ': 'dz', 94 | 'đ': 'dj', 'Ђ': 'Dj', 'Ј': 'j', 'Љ': 'Lj', 'Њ': 'Nj', 'Ћ': 'C', 95 | 'Џ': 'Dz', 'Đ': 'Dj' 96 | }; 97 | const AZERBAIJANI_MAP = { 98 | 'ç': 'c', 'ə': 'e', 'ğ': 'g', 'ı': 'i', 'ö': 'o', 'ş': 's', 'ü': 'u', 99 | 'Ç': 'C', 'Ə': 'E', 'Ğ': 'G', 'İ': 'I', 'Ö': 'O', 'Ş': 'S', 'Ü': 'U' 100 | }; 101 | const GEORGIAN_MAP = { 102 | 'ა': 'a', 'ბ': 'b', 'გ': 'g', 'დ': 'd', 'ე': 'e', 'ვ': 'v', 'ზ': 'z', 103 | 'თ': 't', 'ი': 'i', 'კ': 'k', 'ლ': 'l', 'მ': 'm', 'ნ': 'n', 'ო': 'o', 104 | 'პ': 'p', 'ჟ': 'j', 'რ': 'r', 'ს': 's', 'ტ': 't', 'უ': 'u', 'ფ': 'f', 105 | 'ქ': 'q', 'ღ': 'g', 'ყ': 'y', 'შ': 'sh', 'ჩ': 'ch', 'ც': 'c', 'ძ': 'dz', 106 | 'წ': 'w', 'ჭ': 'ch', 'ხ': 'x', 'ჯ': 'j', 'ჰ': 'h' 107 | }; 108 | 109 | const ALL_DOWNCODE_MAPS = [ 110 | LATIN_MAP, 111 | LATIN_SYMBOLS_MAP, 112 | GREEK_MAP, 113 | TURKISH_MAP, 114 | ROMANIAN_MAP, 115 | RUSSIAN_MAP, 116 | UKRAINIAN_MAP, 117 | CZECH_MAP, 118 | SLOVAK_MAP, 119 | POLISH_MAP, 120 | LATVIAN_MAP, 121 | ARABIC_MAP, 122 | LITHUANIAN_MAP, 123 | SERBIAN_MAP, 124 | AZERBAIJANI_MAP, 125 | GEORGIAN_MAP 126 | ]; 127 | 128 | const Downcoder = { 129 | 'Initialize': function() { 130 | if (Downcoder.map) { // already made 131 | return; 132 | } 133 | Downcoder.map = {}; 134 | for (const lookup of ALL_DOWNCODE_MAPS) { 135 | Object.assign(Downcoder.map, lookup); 136 | } 137 | Downcoder.regex = new RegExp(Object.keys(Downcoder.map).join('|'), 'g'); 138 | } 139 | }; 140 | 141 | function downcode(slug) { 142 | Downcoder.Initialize(); 143 | return slug.replace(Downcoder.regex, function(m) { 144 | return Downcoder.map[m]; 145 | }); 146 | } 147 | 148 | 149 | function URLify(s, num_chars, allowUnicode) { 150 | // changes, e.g., "Petty theft" to "petty-theft" 151 | if (!allowUnicode) { 152 | s = downcode(s); 153 | } 154 | s = s.toLowerCase(); // convert to lowercase 155 | // if downcode doesn't hit, the char will be stripped here 156 | if (allowUnicode) { 157 | // Keep Unicode letters including both lowercase and uppercase 158 | // characters, whitespace, and dash; remove other characters. 159 | s = XRegExp.replace(s, XRegExp('[^-_\\p{L}\\p{N}\\s]', 'g'), ''); 160 | } else { 161 | s = s.replace(/[^-\w\s]/g, ''); // remove unneeded chars 162 | } 163 | s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces 164 | s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens 165 | s = s.substring(0, num_chars); // trim to first num_chars chars 166 | s = s.replace(/-+$/g, ''); // trim any trailing hyphens 167 | return s; 168 | } 169 | window.URLify = URLify; 170 | } 171 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/admin/RelatedObjectLookups.js: -------------------------------------------------------------------------------- 1 | /*global SelectBox, interpolate*/ 2 | // Handles related-objects functionality: lookup link for raw_id_fields 3 | // and Add Another links. 4 | 'use strict'; 5 | { 6 | const $ = django.jQuery; 7 | let popupIndex = 0; 8 | const relatedWindows = []; 9 | 10 | function dismissChildPopups() { 11 | relatedWindows.forEach(function(win) { 12 | if(!win.closed) { 13 | win.dismissChildPopups(); 14 | win.close(); 15 | } 16 | }); 17 | } 18 | 19 | function setPopupIndex() { 20 | if(document.getElementsByName("_popup").length > 0) { 21 | const index = window.name.lastIndexOf("__") + 2; 22 | popupIndex = parseInt(window.name.substring(index)); 23 | } else { 24 | popupIndex = 0; 25 | } 26 | } 27 | 28 | function addPopupIndex(name) { 29 | name = name + "__" + (popupIndex + 1); 30 | return name; 31 | } 32 | 33 | function removePopupIndex(name) { 34 | name = name.replace(new RegExp("__" + (popupIndex + 1) + "$"), ''); 35 | return name; 36 | } 37 | 38 | function showAdminPopup(triggeringLink, name_regexp, add_popup) { 39 | const name = addPopupIndex(triggeringLink.id.replace(name_regexp, '')); 40 | const href = new URL(triggeringLink.href); 41 | if (add_popup) { 42 | href.searchParams.set('_popup', 1); 43 | } 44 | const win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 45 | relatedWindows.push(win); 46 | win.focus(); 47 | return false; 48 | } 49 | 50 | function showRelatedObjectLookupPopup(triggeringLink) { 51 | return showAdminPopup(triggeringLink, /^lookup_/, true); 52 | } 53 | 54 | function dismissRelatedLookupPopup(win, chosenId) { 55 | const name = removePopupIndex(win.name); 56 | const elem = document.getElementById(name); 57 | if (elem.classList.contains('vManyToManyRawIdAdminField') && elem.value) { 58 | elem.value += ',' + chosenId; 59 | } else { 60 | document.getElementById(name).value = chosenId; 61 | } 62 | const index = relatedWindows.indexOf(win); 63 | if (index > -1) { 64 | relatedWindows.splice(index, 1); 65 | } 66 | win.close(); 67 | } 68 | 69 | function showRelatedObjectPopup(triggeringLink) { 70 | return showAdminPopup(triggeringLink, /^(change|add|delete)_/, false); 71 | } 72 | 73 | function updateRelatedObjectLinks(triggeringLink) { 74 | const $this = $(triggeringLink); 75 | const siblings = $this.nextAll('.view-related, .change-related, .delete-related'); 76 | if (!siblings.length) { 77 | return; 78 | } 79 | const value = $this.val(); 80 | if (value) { 81 | siblings.each(function() { 82 | const elm = $(this); 83 | elm.attr('href', elm.attr('data-href-template').replace('__fk__', value)); 84 | }); 85 | } else { 86 | siblings.removeAttr('href'); 87 | } 88 | } 89 | 90 | function dismissAddRelatedObjectPopup(win, newId, newRepr) { 91 | const name = removePopupIndex(win.name); 92 | const elem = document.getElementById(name); 93 | if (elem) { 94 | const elemName = elem.nodeName.toUpperCase(); 95 | if (elemName === 'SELECT') { 96 | elem.options[elem.options.length] = new Option(newRepr, newId, true, true); 97 | } else if (elemName === 'INPUT') { 98 | if (elem.classList.contains('vManyToManyRawIdAdminField') && elem.value) { 99 | elem.value += ',' + newId; 100 | } else { 101 | elem.value = newId; 102 | } 103 | } 104 | // Trigger a change event to update related links if required. 105 | $(elem).trigger('change'); 106 | } else { 107 | const toId = name + "_to"; 108 | const o = new Option(newRepr, newId); 109 | SelectBox.add_to_cache(toId, o); 110 | SelectBox.redisplay(toId); 111 | } 112 | const index = relatedWindows.indexOf(win); 113 | if (index > -1) { 114 | relatedWindows.splice(index, 1); 115 | } 116 | win.close(); 117 | } 118 | 119 | function dismissChangeRelatedObjectPopup(win, objId, newRepr, newId) { 120 | const id = removePopupIndex(win.name.replace(/^edit_/, '')); 121 | const selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]); 122 | const selects = $(selectsSelector); 123 | selects.find('option').each(function() { 124 | if (this.value === objId) { 125 | this.textContent = newRepr; 126 | this.value = newId; 127 | } 128 | }); 129 | selects.next().find('.select2-selection__rendered').each(function() { 130 | // The element can have a clear button as a child. 131 | // Use the lastChild to modify only the displayed value. 132 | this.lastChild.textContent = newRepr; 133 | this.title = newRepr; 134 | }); 135 | const index = relatedWindows.indexOf(win); 136 | if (index > -1) { 137 | relatedWindows.splice(index, 1); 138 | } 139 | win.close(); 140 | } 141 | 142 | function dismissDeleteRelatedObjectPopup(win, objId) { 143 | const id = removePopupIndex(win.name.replace(/^delete_/, '')); 144 | const selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]); 145 | const selects = $(selectsSelector); 146 | selects.find('option').each(function() { 147 | if (this.value === objId) { 148 | $(this).remove(); 149 | } 150 | }).trigger('change'); 151 | const index = relatedWindows.indexOf(win); 152 | if (index > -1) { 153 | relatedWindows.splice(index, 1); 154 | } 155 | win.close(); 156 | } 157 | 158 | window.showRelatedObjectLookupPopup = showRelatedObjectLookupPopup; 159 | window.dismissRelatedLookupPopup = dismissRelatedLookupPopup; 160 | window.showRelatedObjectPopup = showRelatedObjectPopup; 161 | window.updateRelatedObjectLinks = updateRelatedObjectLinks; 162 | window.dismissAddRelatedObjectPopup = dismissAddRelatedObjectPopup; 163 | window.dismissChangeRelatedObjectPopup = dismissChangeRelatedObjectPopup; 164 | window.dismissDeleteRelatedObjectPopup = dismissDeleteRelatedObjectPopup; 165 | window.dismissChildPopups = dismissChildPopups; 166 | 167 | // Kept for backward compatibility 168 | window.showAddAnotherPopup = showRelatedObjectPopup; 169 | window.dismissAddAnotherPopup = dismissAddRelatedObjectPopup; 170 | 171 | window.addEventListener('unload', function(evt) { 172 | window.dismissChildPopups(); 173 | }); 174 | 175 | $(document).ready(function() { 176 | setPopupIndex(); 177 | $("a[data-popup-opener]").on('click', function(event) { 178 | event.preventDefault(); 179 | opener.dismissRelatedLookupPopup(window, $(this).data("popup-opener")); 180 | }); 181 | $('body').on('click', '.related-widget-wrapper-link', function(e) { 182 | e.preventDefault(); 183 | if (this.href) { 184 | const event = $.Event('django:show-related', {href: this.href}); 185 | $(this).trigger(event); 186 | if (!event.isDefaultPrevented()) { 187 | showRelatedObjectPopup(this); 188 | } 189 | } 190 | }); 191 | $('body').on('change', '.related-widget-wrapper select', function(e) { 192 | const event = $.Event('django:update-related'); 193 | $(this).trigger(event); 194 | if (!event.isDefaultPrevented()) { 195 | updateRelatedObjectLinks(this); 196 | } 197 | }); 198 | $('.related-widget-wrapper select').trigger('change'); 199 | $('body').on('click', '.related-lookup', function(e) { 200 | e.preventDefault(); 201 | const event = $.Event('django:lookup-related'); 202 | $(this).trigger(event); 203 | if (!event.isDefaultPrevented()) { 204 | showRelatedObjectLookupPopup(this); 205 | } 206 | }); 207 | }); 208 | } 209 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/actions.js: -------------------------------------------------------------------------------- 1 | /*global gettext, interpolate, ngettext*/ 2 | 'use strict'; 3 | { 4 | function show(selector) { 5 | document.querySelectorAll(selector).forEach(function(el) { 6 | el.classList.remove('hidden'); 7 | }); 8 | } 9 | 10 | function hide(selector) { 11 | document.querySelectorAll(selector).forEach(function(el) { 12 | el.classList.add('hidden'); 13 | }); 14 | } 15 | 16 | function showQuestion(options) { 17 | hide(options.acrossClears); 18 | show(options.acrossQuestions); 19 | hide(options.allContainer); 20 | } 21 | 22 | function showClear(options) { 23 | show(options.acrossClears); 24 | hide(options.acrossQuestions); 25 | document.querySelector(options.actionContainer).classList.remove(options.selectedClass); 26 | show(options.allContainer); 27 | hide(options.counterContainer); 28 | } 29 | 30 | function reset(options) { 31 | hide(options.acrossClears); 32 | hide(options.acrossQuestions); 33 | hide(options.allContainer); 34 | show(options.counterContainer); 35 | } 36 | 37 | function clearAcross(options) { 38 | reset(options); 39 | const acrossInputs = document.querySelectorAll(options.acrossInput); 40 | acrossInputs.forEach(function(acrossInput) { 41 | acrossInput.value = 0; 42 | }); 43 | document.querySelector(options.actionContainer).classList.remove(options.selectedClass); 44 | } 45 | 46 | function checker(actionCheckboxes, options, checked) { 47 | if (checked) { 48 | showQuestion(options); 49 | } else { 50 | reset(options); 51 | } 52 | actionCheckboxes.forEach(function(el) { 53 | el.checked = checked; 54 | el.closest('tr').classList.toggle(options.selectedClass, checked); 55 | }); 56 | } 57 | 58 | function updateCounter(actionCheckboxes, options) { 59 | const sel = Array.from(actionCheckboxes).filter(function(el) { 60 | return el.checked; 61 | }).length; 62 | const counter = document.querySelector(options.counterContainer); 63 | // data-actions-icnt is defined in the generated HTML 64 | // and contains the total amount of objects in the queryset 65 | const actions_icnt = Number(counter.dataset.actionsIcnt); 66 | counter.textContent = interpolate( 67 | ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), { 68 | sel: sel, 69 | cnt: actions_icnt 70 | }, true); 71 | const allToggle = document.getElementById(options.allToggleId); 72 | allToggle.checked = sel === actionCheckboxes.length; 73 | if (allToggle.checked) { 74 | showQuestion(options); 75 | } else { 76 | clearAcross(options); 77 | } 78 | } 79 | 80 | const defaults = { 81 | actionContainer: "div.actions", 82 | counterContainer: "span.action-counter", 83 | allContainer: "div.actions span.all", 84 | acrossInput: "div.actions input.select-across", 85 | acrossQuestions: "div.actions span.question", 86 | acrossClears: "div.actions span.clear", 87 | allToggleId: "action-toggle", 88 | selectedClass: "selected" 89 | }; 90 | 91 | window.Actions = function(actionCheckboxes, options) { 92 | options = Object.assign({}, defaults, options); 93 | let list_editable_changed = false; 94 | let lastChecked = null; 95 | let shiftPressed = false; 96 | 97 | document.addEventListener('keydown', (event) => { 98 | shiftPressed = event.shiftKey; 99 | }); 100 | 101 | document.addEventListener('keyup', (event) => { 102 | shiftPressed = event.shiftKey; 103 | }); 104 | 105 | document.getElementById(options.allToggleId).addEventListener('click', function(event) { 106 | checker(actionCheckboxes, options, this.checked); 107 | updateCounter(actionCheckboxes, options); 108 | }); 109 | 110 | document.querySelectorAll(options.acrossQuestions + " a").forEach(function(el) { 111 | el.addEventListener('click', function(event) { 112 | event.preventDefault(); 113 | const acrossInputs = document.querySelectorAll(options.acrossInput); 114 | acrossInputs.forEach(function(acrossInput) { 115 | acrossInput.value = 1; 116 | }); 117 | showClear(options); 118 | }); 119 | }); 120 | 121 | document.querySelectorAll(options.acrossClears + " a").forEach(function(el) { 122 | el.addEventListener('click', function(event) { 123 | event.preventDefault(); 124 | document.getElementById(options.allToggleId).checked = false; 125 | clearAcross(options); 126 | checker(actionCheckboxes, options, false); 127 | updateCounter(actionCheckboxes, options); 128 | }); 129 | }); 130 | 131 | function affectedCheckboxes(target, withModifier) { 132 | const multiSelect = (lastChecked && withModifier && lastChecked !== target); 133 | if (!multiSelect) { 134 | return [target]; 135 | } 136 | const checkboxes = Array.from(actionCheckboxes); 137 | const targetIndex = checkboxes.findIndex(el => el === target); 138 | const lastCheckedIndex = checkboxes.findIndex(el => el === lastChecked); 139 | const startIndex = Math.min(targetIndex, lastCheckedIndex); 140 | const endIndex = Math.max(targetIndex, lastCheckedIndex); 141 | const filtered = checkboxes.filter((el, index) => (startIndex <= index) && (index <= endIndex)); 142 | return filtered; 143 | }; 144 | 145 | Array.from(document.getElementById('result_list').tBodies).forEach(function(el) { 146 | el.addEventListener('change', function(event) { 147 | const target = event.target; 148 | if (target.classList.contains('action-select')) { 149 | const checkboxes = affectedCheckboxes(target, shiftPressed); 150 | checker(checkboxes, options, target.checked); 151 | updateCounter(actionCheckboxes, options); 152 | lastChecked = target; 153 | } else { 154 | list_editable_changed = true; 155 | } 156 | }); 157 | }); 158 | 159 | document.querySelector('#changelist-form button[name=index]').addEventListener('click', function(event) { 160 | if (list_editable_changed) { 161 | const confirmed = confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost.")); 162 | if (!confirmed) { 163 | event.preventDefault(); 164 | } 165 | } 166 | }); 167 | 168 | const el = document.querySelector('#changelist-form input[name=_save]'); 169 | // The button does not exist if no fields are editable. 170 | if (el) { 171 | el.addEventListener('click', function(event) { 172 | if (document.querySelector('[name=action]').value) { 173 | const text = list_editable_changed 174 | ? gettext("You have selected an action, but you haven’t saved your changes to individual fields yet. Please click OK to save. You’ll need to re-run the action.") 175 | : gettext("You have selected an action, and you haven’t made any changes on individual fields. You’re probably looking for the Go button rather than the Save button."); 176 | if (!confirm(text)) { 177 | event.preventDefault(); 178 | } 179 | } 180 | }); 181 | } 182 | }; 183 | 184 | // Call function fn when the DOM is loaded and ready. If it is already 185 | // loaded, call the function now. 186 | // http://youmightnotneedjquery.com/#ready 187 | function ready(fn) { 188 | if (document.readyState !== 'loading') { 189 | fn(); 190 | } else { 191 | document.addEventListener('DOMContentLoaded', fn); 192 | } 193 | } 194 | 195 | ready(function() { 196 | const actionsEls = document.querySelectorAll('tr input.action-select'); 197 | if (actionsEls.length > 0) { 198 | Actions(actionsEls); 199 | } 200 | }); 201 | } 202 | -------------------------------------------------------------------------------- /admin_refresh/static/admin/js/calendar.js: -------------------------------------------------------------------------------- 1 | /*global gettext, pgettext, get_format, quickElement, removeChildren*/ 2 | /* 3 | calendar.js - Calendar functions by Adrian Holovaty 4 | depends on core.js for utility functions like removeChildren or quickElement 5 | */ 6 | 'use strict'; 7 | { 8 | // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions 9 | const CalendarNamespace = { 10 | monthsOfYear: [ 11 | gettext('January'), 12 | gettext('February'), 13 | gettext('March'), 14 | gettext('April'), 15 | gettext('May'), 16 | gettext('June'), 17 | gettext('July'), 18 | gettext('August'), 19 | gettext('September'), 20 | gettext('October'), 21 | gettext('November'), 22 | gettext('December') 23 | ], 24 | monthsOfYearAbbrev: [ 25 | pgettext('abbrev. month January', 'Jan'), 26 | pgettext('abbrev. month February', 'Feb'), 27 | pgettext('abbrev. month March', 'Mar'), 28 | pgettext('abbrev. month April', 'Apr'), 29 | pgettext('abbrev. month May', 'May'), 30 | pgettext('abbrev. month June', 'Jun'), 31 | pgettext('abbrev. month July', 'Jul'), 32 | pgettext('abbrev. month August', 'Aug'), 33 | pgettext('abbrev. month September', 'Sep'), 34 | pgettext('abbrev. month October', 'Oct'), 35 | pgettext('abbrev. month November', 'Nov'), 36 | pgettext('abbrev. month December', 'Dec') 37 | ], 38 | daysOfWeek: [ 39 | pgettext('one letter Sunday', 'S'), 40 | pgettext('one letter Monday', 'M'), 41 | pgettext('one letter Tuesday', 'T'), 42 | pgettext('one letter Wednesday', 'W'), 43 | pgettext('one letter Thursday', 'T'), 44 | pgettext('one letter Friday', 'F'), 45 | pgettext('one letter Saturday', 'S') 46 | ], 47 | firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')), 48 | isLeapYear: function(year) { 49 | return (((year % 4) === 0) && ((year % 100) !== 0 ) || ((year % 400) === 0)); 50 | }, 51 | getDaysInMonth: function(month, year) { 52 | let days; 53 | if (month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12) { 54 | days = 31; 55 | } 56 | else if (month === 4 || month === 6 || month === 9 || month === 11) { 57 | days = 30; 58 | } 59 | else if (month === 2 && CalendarNamespace.isLeapYear(year)) { 60 | days = 29; 61 | } 62 | else { 63 | days = 28; 64 | } 65 | return days; 66 | }, 67 | draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999 68 | const today = new Date(); 69 | const todayDay = today.getDate(); 70 | const todayMonth = today.getMonth() + 1; 71 | const todayYear = today.getFullYear(); 72 | let todayClass = ''; 73 | 74 | // Use UTC functions here because the date field does not contain time 75 | // and using the UTC function variants prevent the local time offset 76 | // from altering the date, specifically the day field. For example: 77 | // 78 | // ``` 79 | // var x = new Date('2013-10-02'); 80 | // var day = x.getDate(); 81 | // ``` 82 | // 83 | // The day variable above will be 1 instead of 2 in, say, US Pacific time 84 | // zone. 85 | let isSelectedMonth = false; 86 | if (typeof selected !== 'undefined') { 87 | isSelectedMonth = (selected.getUTCFullYear() === year && (selected.getUTCMonth() + 1) === month); 88 | } 89 | 90 | month = parseInt(month); 91 | year = parseInt(year); 92 | const calDiv = document.getElementById(div_id); 93 | removeChildren(calDiv); 94 | const calTable = document.createElement('table'); 95 | quickElement('caption', calTable, CalendarNamespace.monthsOfYear[month - 1] + ' ' + year); 96 | const tableBody = quickElement('tbody', calTable); 97 | 98 | // Draw days-of-week header 99 | let tableRow = quickElement('tr', tableBody); 100 | for (let i = 0; i < 7; i++) { 101 | quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]); 102 | } 103 | 104 | const startingPos = new Date(year, month - 1, 1 - CalendarNamespace.firstDayOfWeek).getDay(); 105 | const days = CalendarNamespace.getDaysInMonth(month, year); 106 | 107 | let nonDayCell; 108 | 109 | // Draw blanks before first of month 110 | tableRow = quickElement('tr', tableBody); 111 | for (let i = 0; i < startingPos; i++) { 112 | nonDayCell = quickElement('td', tableRow, ' '); 113 | nonDayCell.className = "nonday"; 114 | } 115 | 116 | function calendarMonth(y, m) { 117 | function onClick(e) { 118 | e.preventDefault(); 119 | callback(y, m, this.textContent); 120 | } 121 | return onClick; 122 | } 123 | 124 | // Draw days of month 125 | let currentDay = 1; 126 | for (let i = startingPos; currentDay <= days; i++) { 127 | if (i % 7 === 0 && currentDay !== 1) { 128 | tableRow = quickElement('tr', tableBody); 129 | } 130 | if ((currentDay === todayDay) && (month === todayMonth) && (year === todayYear)) { 131 | todayClass = 'today'; 132 | } else { 133 | todayClass = ''; 134 | } 135 | 136 | // use UTC function; see above for explanation. 137 | if (isSelectedMonth && currentDay === selected.getUTCDate()) { 138 | if (todayClass !== '') { 139 | todayClass += " "; 140 | } 141 | todayClass += "selected"; 142 | } 143 | 144 | const cell = quickElement('td', tableRow, '', 'class', todayClass); 145 | const link = quickElement('a', cell, currentDay, 'href', '#'); 146 | link.addEventListener('click', calendarMonth(year, month)); 147 | currentDay++; 148 | } 149 | 150 | // Draw blanks after end of month (optional, but makes for valid code) 151 | while (tableRow.childNodes.length < 7) { 152 | nonDayCell = quickElement('td', tableRow, ' '); 153 | nonDayCell.className = "nonday"; 154 | } 155 | 156 | calDiv.appendChild(calTable); 157 | } 158 | }; 159 | 160 | // Calendar -- A calendar instance 161 | function Calendar(div_id, callback, selected) { 162 | // div_id (string) is the ID of the element in which the calendar will 163 | // be displayed 164 | // callback (string) is the name of a JavaScript function that will be 165 | // called with the parameters (year, month, day) when a day in the 166 | // calendar is clicked 167 | this.div_id = div_id; 168 | this.callback = callback; 169 | this.today = new Date(); 170 | this.currentMonth = this.today.getMonth() + 1; 171 | this.currentYear = this.today.getFullYear(); 172 | if (typeof selected !== 'undefined') { 173 | this.selected = selected; 174 | } 175 | } 176 | Calendar.prototype = { 177 | drawCurrent: function() { 178 | CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback, this.selected); 179 | }, 180 | drawDate: function(month, year, selected) { 181 | this.currentMonth = month; 182 | this.currentYear = year; 183 | 184 | if(selected) { 185 | this.selected = selected; 186 | } 187 | 188 | this.drawCurrent(); 189 | }, 190 | drawPreviousMonth: function() { 191 | if (this.currentMonth === 1) { 192 | this.currentMonth = 12; 193 | this.currentYear--; 194 | } 195 | else { 196 | this.currentMonth--; 197 | } 198 | this.drawCurrent(); 199 | }, 200 | drawNextMonth: function() { 201 | if (this.currentMonth === 12) { 202 | this.currentMonth = 1; 203 | this.currentYear++; 204 | } 205 | else { 206 | this.currentMonth++; 207 | } 208 | this.drawCurrent(); 209 | }, 210 | drawPreviousYear: function() { 211 | this.currentYear--; 212 | this.drawCurrent(); 213 | }, 214 | drawNextYear: function() { 215 | this.currentYear++; 216 | this.drawCurrent(); 217 | } 218 | }; 219 | window.Calendar = Calendar; 220 | window.CalendarNamespace = CalendarNamespace; 221 | } 222 | --------------------------------------------------------------------------------