From 8d82d80c19f76f409f75456bf974966f6d8295a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 22 Dec 2022 09:32:38 +0100 Subject: [PATCH 001/232] Update pre-commit hooks. (#236) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e700b333..b3fb8cc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: black - repo: https://github.com/pycqa/isort - rev: v5.11.3 + rev: 5.11.4 hooks: - id: isort args: ["--profile", "black"] From 7f170aadc5c2d123c9a50a34bcab33859cfe3d89 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 29 Dec 2022 12:33:20 +0100 Subject: [PATCH 002/232] Add pull request template. [ci skip] --- .github/PULL_REQUEST_TEMPLATE/pull_request.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request.md b/.github/PULL_REQUEST_TEMPLATE/pull_request.md new file mode 100644 index 00000000..58c1dfb2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request.md @@ -0,0 +1,19 @@ +--- +name: Pull request +about: Submit a pull request for this project +title: '' +assignees: fabiocaccamo + +--- + +**Describe your changes** +? + +**Related issue** +? + +**Checklist before requesting a review** +- [ ] I have performed a self-review of my code. +- [ ] I have added torough tests for the proposed changes. +- [ ] I have run the tests and there are not errors. +- [ ] I have updated translations. From 265acda04a42a24cf4cb8d1a5bf489620e9124b8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 29 Dec 2022 12:57:11 +0100 Subject: [PATCH 003/232] Rename pull request template file. [ci skip] --- .../{pull_request.md => pull_request_template.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/PULL_REQUEST_TEMPLATE/{pull_request.md => pull_request_template.md} (100%) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE/pull_request.md rename to .github/PULL_REQUEST_TEMPLATE/pull_request_template.md From 2baae84e84fef066580268fe6c27d8c57179ec96 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 29 Dec 2022 13:04:48 +0100 Subject: [PATCH 004/232] Move pull request template file. [ci skip] --- .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md (90%) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/pull_request_template.md similarity index 90% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/pull_request_template.md index 58c1dfb2..7db9c589 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,4 +16,4 @@ assignees: fabiocaccamo - [ ] I have performed a self-review of my code. - [ ] I have added torough tests for the proposed changes. - [ ] I have run the tests and there are not errors. -- [ ] I have updated translations. +- [ ] I have updated translation files. From 5263bb02ea55052e28fce9e800d880d5d6875390 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 29 Dec 2022 13:20:29 +0100 Subject: [PATCH 005/232] Create CODE_OF_CONDUCT.md (#238) --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..23be9cb9 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +fabio.caccamo@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From ab3f41c3f2afadd4673dcbbbe5b413c4f89fabb7 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sat, 31 Dec 2022 15:31:28 +0100 Subject: [PATCH 006/232] Add `setup.cfg` (`setuptools` declarative syntax) generated using `setuptools-py2cfg`. --- setup.cfg | 53 +++++++++++++++++++++++++++++++++- setup.py | 85 ++----------------------------------------------------- 2 files changed, 55 insertions(+), 83 deletions(-) diff --git a/setup.cfg b/setup.cfg index b88034e4..d88ecb27 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,53 @@ [metadata] -description-file = README.md +name = django-admin-interface +version = 0.24.2 +author = Fabio Caccamo +author_email = fabio.caccamo@gmail.com +description = django-admin-interface is a modern responsive flat admin interface customizable by the admin itself. +keywords = + django + admin + interface + responsive + flat + theme + custom + ui +url = https://github.com/fabiocaccamo/django-admin-interface +download_url = https://github.com/fabiocaccamo/django-admin-interface/archive/0.24.2.tar.gz +long_description = file: README.md +long_description_content_type = text/markdown +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Web Environment + Framework :: Django + Framework :: Django :: 2.2 + Framework :: Django :: 3.0 + Framework :: Django :: 3.1 + Framework :: Django :: 3.2 + Framework :: Django :: 4.0 + Framework :: Django :: 4.1 + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Topic :: Software Development :: Build Tools +requires = django (>= 2.2) +project_urls = + Documentation = https://github.com/fabiocaccamo/django-admin-interface#readme + Issues = https://github.com/fabiocaccamo/django-admin-interface/issues + Funding = https://github.com/sponsors/fabiocaccamo/ + Twitter = https://twitter.com/fabiocaccamo + +[options] +packages = find: +install_requires = django-colorfield >= 0.8.0, < 1.0.0 +include_package_data = True + +[options.packages.find] +exclude = contrib; docs; tests* diff --git a/setup.py b/setup.py index 3364db41..7f1a1763 100644 --- a/setup.py +++ b/setup.py @@ -1,83 +1,4 @@ -#!/usr/bin/env python +from setuptools import setup -import os -import sys - -from setuptools import find_packages, setup - -exec(open("admin_interface/version.py").read()) - -package_name = "django-admin-interface" -package_url = f"https://github.com/fabiocaccamo/{package_name}" -package_path = os.path.abspath(os.path.dirname(__file__)) -download_url = f"{package_url}/archive/{__version__}.tar.gz" -documentation_url = f"{package_url}#readme" -issues_url = f"{package_url}/issues" -sponsor_url = "https://github.com/sponsors/fabiocaccamo/" -twitter_url = "https://twitter.com/fabiocaccamo" - -long_description_file_path = os.path.join(package_path, "README.md") -long_description_content_type = "text/markdown" -long_description = "" -try: - with open(long_description_file_path, "r", encoding="utf-8") as f: - long_description = f.read() -except IOError: - pass - -setup( - name=package_name, - packages=find_packages(exclude=["contrib", "docs", "tests*"]), - include_package_data=True, - version=__version__, - description="django-admin-interface is a modern responsive flat admin interface customizable by the admin itself.", - long_description=long_description, - long_description_content_type=long_description_content_type, - author="Fabio Caccamo", - author_email="fabio.caccamo@gmail.com", - url=package_url, - download_url=download_url, - project_urls={ - "Documentation": documentation_url, - "Issues": issues_url, - "Funding": sponsor_url, - "Twitter": twitter_url, - }, - keywords=[ - "django", - "admin", - "interface", - "responsive", - "flat", - "theme", - "custom", - "ui", - ], - requires=[ - "django (>= 2.2)", - ], - install_requires=[ - "django-colorfield >= 0.8.0, < 1.0.0", - ], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: Django", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.0", - "Framework :: Django :: 3.1", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Topic :: Software Development :: Build Tools", - ], -) +if __name__ == "__main__": + setup() From 8f107309d10d5ebbf7661ed4efeb2749ec42a5d8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sat, 31 Dec 2022 15:47:48 +0100 Subject: [PATCH 007/232] Update `pyproject.toml`. [ci skip] --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9e356792..90ec106b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + [tool.black] include = '\.pyi?$' exclude = ''' From b8a8c1595f4efb804e578b40096e2ae5db9f9083 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sat, 31 Dec 2022 18:53:01 +0100 Subject: [PATCH 008/232] Add `pyupgrade` to `pre-commit` config. --- .pre-commit-config.yaml | 5 +++++ admin_interface/migrations/0001_initial.py | 2 -- admin_interface/migrations/0002_add_related_modal.py | 2 -- admin_interface/migrations/0003_add_logo_color.py | 2 -- admin_interface/migrations/0004_rename_title_color.py | 2 -- .../migrations/0005_add_recent_actions_visible.py | 2 -- admin_interface/migrations/0006_bytes_to_str.py | 2 -- admin_interface/migrations/0007_add_favicon.py | 2 -- .../0008_change_related_modal_background_opacity_type.py | 2 -- admin_interface/migrations/0009_add_enviroment.py | 2 -- admin_interface/migrations/0010_add_localization.py | 2 -- admin_interface/migrations/0011_add_environment_options.py | 2 -- admin_interface/migrations/0012_update_verbose_names.py | 2 -- .../migrations/0013_add_related_modal_close_button.py | 2 -- admin_interface/migrations/0014_name_unique.py | 2 -- .../migrations/0015_add_language_chooser_active.py | 2 -- .../migrations/0016_add_language_chooser_display.py | 2 -- .../migrations/0017_change_list_filter_dropdown.py | 2 -- admin_interface/migrations/0018_theme_list_filter_sticky.py | 2 -- admin_interface/migrations/0019_add_form_sticky.py | 2 -- admin_interface/migrations/0020_module_selected_colors.py | 2 -- admin_interface/migrations/0021_file_extension_validator.py | 2 -- .../migrations/0022_add_logo_max_width_and_height.py | 2 -- admin_interface/migrations/0023_theme_foldable_apps.py | 2 -- admin_interface/migrations/0024_remove_theme_css.py | 2 -- tests/routers.py | 2 +- tests/test_fixtures.py | 2 +- 27 files changed, 7 insertions(+), 50 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b3fb8cc4..b9318615 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,6 +2,11 @@ # See https://pre-commit.com/hooks.html for more hooks repos: + - repo: https://github.com/asottile/pyupgrade + rev: v3.3.1 + hooks: + - id: pyupgrade + - repo: https://github.com/psf/black rev: 22.12.0 hooks: diff --git a/admin_interface/migrations/0001_initial.py b/admin_interface/migrations/0001_initial.py index c3cd74c3..b18ec0ac 100644 --- a/admin_interface/migrations/0001_initial.py +++ b/admin_interface/migrations/0001_initial.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations, models diff --git a/admin_interface/migrations/0002_add_related_modal.py b/admin_interface/migrations/0002_add_related_modal.py index cde7d3c9..94adfb1f 100644 --- a/admin_interface/migrations/0002_add_related_modal.py +++ b/admin_interface/migrations/0002_add_related_modal.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations, models diff --git a/admin_interface/migrations/0003_add_logo_color.py b/admin_interface/migrations/0003_add_logo_color.py index a2e97484..b140e5e6 100644 --- a/admin_interface/migrations/0003_add_logo_color.py +++ b/admin_interface/migrations/0003_add_logo_color.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations, models diff --git a/admin_interface/migrations/0004_rename_title_color.py b/admin_interface/migrations/0004_rename_title_color.py index 400fe89a..d93cd164 100644 --- a/admin_interface/migrations/0004_rename_title_color.py +++ b/admin_interface/migrations/0004_rename_title_color.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations diff --git a/admin_interface/migrations/0005_add_recent_actions_visible.py b/admin_interface/migrations/0005_add_recent_actions_visible.py index 6372f889..e94e8dde 100644 --- a/admin_interface/migrations/0005_add_recent_actions_visible.py +++ b/admin_interface/migrations/0005_add_recent_actions_visible.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0006_bytes_to_str.py b/admin_interface/migrations/0006_bytes_to_str.py index 3bb38518..04f119f0 100644 --- a/admin_interface/migrations/0006_bytes_to_str.py +++ b/admin_interface/migrations/0006_bytes_to_str.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations, models diff --git a/admin_interface/migrations/0007_add_favicon.py b/admin_interface/migrations/0007_add_favicon.py index 24496e65..52230e3b 100644 --- a/admin_interface/migrations/0007_add_favicon.py +++ b/admin_interface/migrations/0007_add_favicon.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py index dee40a59..2950b784 100644 --- a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py +++ b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0009_add_enviroment.py b/admin_interface/migrations/0009_add_enviroment.py index 1c9c8ee4..ee085273 100644 --- a/admin_interface/migrations/0009_add_enviroment.py +++ b/admin_interface/migrations/0009_add_enviroment.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0010_add_localization.py b/admin_interface/migrations/0010_add_localization.py index 542d4b57..76645113 100644 --- a/admin_interface/migrations/0010_add_localization.py +++ b/admin_interface/migrations/0010_add_localization.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0011_add_environment_options.py b/admin_interface/migrations/0011_add_environment_options.py index d2e4cc37..70f34724 100644 --- a/admin_interface/migrations/0011_add_environment_options.py +++ b/admin_interface/migrations/0011_add_environment_options.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations, models diff --git a/admin_interface/migrations/0012_update_verbose_names.py b/admin_interface/migrations/0012_update_verbose_names.py index 7db832a3..2b8af66e 100644 --- a/admin_interface/migrations/0012_update_verbose_names.py +++ b/admin_interface/migrations/0012_update_verbose_names.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations diff --git a/admin_interface/migrations/0013_add_related_modal_close_button.py b/admin_interface/migrations/0013_add_related_modal_close_button.py index 1e5c7f73..1be545c2 100644 --- a/admin_interface/migrations/0013_add_related_modal_close_button.py +++ b/admin_interface/migrations/0013_add_related_modal_close_button.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0014_name_unique.py b/admin_interface/migrations/0014_name_unique.py index 86c76188..3c09ccc4 100644 --- a/admin_interface/migrations/0014_name_unique.py +++ b/admin_interface/migrations/0014_name_unique.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0015_add_language_chooser_active.py b/admin_interface/migrations/0015_add_language_chooser_active.py index c1d84b0f..414f4414 100644 --- a/admin_interface/migrations/0015_add_language_chooser_active.py +++ b/admin_interface/migrations/0015_add_language_chooser_active.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0016_add_language_chooser_display.py b/admin_interface/migrations/0016_add_language_chooser_display.py index a847fde6..797cd3d4 100644 --- a/admin_interface/migrations/0016_add_language_chooser_display.py +++ b/admin_interface/migrations/0016_add_language_chooser_display.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0017_change_list_filter_dropdown.py b/admin_interface/migrations/0017_change_list_filter_dropdown.py index 7b40e756..0030e259 100644 --- a/admin_interface/migrations/0017_change_list_filter_dropdown.py +++ b/admin_interface/migrations/0017_change_list_filter_dropdown.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0018_theme_list_filter_sticky.py b/admin_interface/migrations/0018_theme_list_filter_sticky.py index 67274733..82192616 100644 --- a/admin_interface/migrations/0018_theme_list_filter_sticky.py +++ b/admin_interface/migrations/0018_theme_list_filter_sticky.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0019_add_form_sticky.py b/admin_interface/migrations/0019_add_form_sticky.py index ba4d8e54..90cc143b 100644 --- a/admin_interface/migrations/0019_add_form_sticky.py +++ b/admin_interface/migrations/0019_add_form_sticky.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0020_module_selected_colors.py b/admin_interface/migrations/0020_module_selected_colors.py index 170257c4..631fcd1c 100644 --- a/admin_interface/migrations/0020_module_selected_colors.py +++ b/admin_interface/migrations/0020_module_selected_colors.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - import colorfield.fields from django.db import migrations from django.db.models import F diff --git a/admin_interface/migrations/0021_file_extension_validator.py b/admin_interface/migrations/0021_file_extension_validator.py index 9a9bab14..8cc657b1 100644 --- a/admin_interface/migrations/0021_file_extension_validator.py +++ b/admin_interface/migrations/0021_file_extension_validator.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.core.validators import FileExtensionValidator from django.db import migrations, models diff --git a/admin_interface/migrations/0022_add_logo_max_width_and_height.py b/admin_interface/migrations/0022_add_logo_max_width_and_height.py index f81323c6..8d6b3652 100644 --- a/admin_interface/migrations/0022_add_logo_max_width_and_height.py +++ b/admin_interface/migrations/0022_add_logo_max_width_and_height.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0023_theme_foldable_apps.py b/admin_interface/migrations/0023_theme_foldable_apps.py index be0e5836..9ac21a9e 100644 --- a/admin_interface/migrations/0023_theme_foldable_apps.py +++ b/admin_interface/migrations/0023_theme_foldable_apps.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/admin_interface/migrations/0024_remove_theme_css.py b/admin_interface/migrations/0024_remove_theme_css.py index 5111871c..e4ecc5ff 100644 --- a/admin_interface/migrations/0024_remove_theme_css.py +++ b/admin_interface/migrations/0024_remove_theme_css.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.db import migrations diff --git a/tests/routers.py b/tests/routers.py index 682a8b62..988acfd9 100644 --- a/tests/routers.py +++ b/tests/routers.py @@ -3,7 +3,7 @@ } -class DatabaseAppsRouter(object): +class DatabaseAppsRouter: """ arouter to control all database operations on models for different databases. diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index 7b2cc2c5..4a282777 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -12,7 +12,7 @@ def tearDown(self): pass def __load_theme(self, theme_name): - call_command("loaddata", "admin_interface_theme_%s.json" % (theme_name,)) + call_command("loaddata", "admin_interface_theme_{}.json".format(theme_name)) def test_import_initial_data(self): call_command("loaddata", "initial_data.json") From 08bd7c98426a2e6a5bb83ed326901ab3c6519469 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 2 Jan 2023 17:25:31 +0100 Subject: [PATCH 009/232] Update setup.cfg --- setup.cfg | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index d88ecb27..d5da9f1a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,10 @@ [metadata] name = django-admin-interface -version = 0.24.2 +version = attr: admin_interface.version.__version__ author = Fabio Caccamo author_email = fabio.caccamo@gmail.com +maintainer = Fabio Caccamo +maintainer_email = fabio.caccamo@gmail.com description = django-admin-interface is a modern responsive flat admin interface customizable by the admin itself. keywords = django @@ -13,8 +15,9 @@ keywords = theme custom ui -url = https://github.com/fabiocaccamo/django-admin-interface -download_url = https://github.com/fabiocaccamo/django-admin-interface/archive/0.24.2.tar.gz +url = https://github.com/fabiocaccamo/%(name)s +download_url = https://github.com/fabiocaccamo/%(name)s/releases +license = MIT long_description = file: README.md long_description_content_type = text/markdown classifiers = @@ -39,8 +42,8 @@ classifiers = Topic :: Software Development :: Build Tools requires = django (>= 2.2) project_urls = - Documentation = https://github.com/fabiocaccamo/django-admin-interface#readme - Issues = https://github.com/fabiocaccamo/django-admin-interface/issues + Documentation = https://github.com/fabiocaccamo/%(name)s#readme + Issues = https://github.com/fabiocaccamo/%(name)s/issues Funding = https://github.com/sponsors/fabiocaccamo/ Twitter = https://twitter.com/fabiocaccamo From c28bfcf27a06f4c1b4aa35db8d738cb38a06bacd Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 2 Jan 2023 20:40:43 +0100 Subject: [PATCH 010/232] Update requirements-test.txt --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index f272f031..345b5fbb 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ codecov coverage pre-commit -psycopg2 +psycopg2-binary tox From 09f495b176796a22d8395f35a126100c37b1255f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sun, 8 Jan 2023 21:54:50 +0100 Subject: [PATCH 011/232] Pin test requirements. --- requirements-test.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 345b5fbb..099b8940 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ -codecov -coverage -pre-commit -psycopg2-binary -tox +codecov == 2.1.12 +coverage == 7.0.3 +pre-commit == 2.21.0 +psycopg2-binary == 2.9.5 +tox == 4.2.4 \ No newline at end of file From b4e01fea0fc1048abc7be08c89a5b79fda78e865 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 9 Jan 2023 18:16:16 +0100 Subject: [PATCH 012/232] Update requirements-test.txt --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 099b8940..67c1a035 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,4 +2,4 @@ codecov == 2.1.12 coverage == 7.0.3 pre-commit == 2.21.0 psycopg2-binary == 2.9.5 -tox == 4.2.4 \ No newline at end of file +tox == 4.2.4 From a7336991bc5aafbc2b4450321d8af828fb2f7bb0 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 10 Jan 2023 17:41:14 +0100 Subject: [PATCH 013/232] Update FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 325b7169..ccf0a974 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,5 @@ github: [fabiocaccamo] ko_fi: fabiocaccamo liberapay: fabiocaccamo +tidelift: pypi/django-admin-interface custom: ["https://www.buymeacoffee.com/fabiocaccamo", "https://www.paypal.me/fabiocaccamo"] From bb0ae3d4f77a5a4982924aa4fbdacb2c913493c6 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 11 Jan 2023 16:50:15 +0100 Subject: [PATCH 014/232] Update dependabot.yml --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 87a850b6..97875542 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,9 +4,9 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "daily" + interval: "weekly" - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "weekly" From fd3d20ec11a657adeb1e73f25dd9631e7f4be882 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 12 Jan 2023 13:07:11 +0100 Subject: [PATCH 015/232] Update setup.cfg --- setup.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d5da9f1a..f2e6788a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,4 +53,8 @@ install_requires = django-colorfield >= 0.8.0, < 1.0.0 include_package_data = True [options.packages.find] -exclude = contrib; docs; tests* +exclude = + docs* + images* + scripts* + tests* From 5d67f815da864787fd04fd620b7c585ffcdd322d Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 16 Jan 2023 18:29:16 +0100 Subject: [PATCH 016/232] Update pre-commit-autoupdate.yml --- .github/workflows/pre-commit-autoupdate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 76563ba7..14cb49ac 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.x' - uses: browniebroke/pre-commit-autoupdate-action@main - uses: peter-evans/create-pull-request@v4 with: From a567f93136827d578dabf6a0ab6fecca2e3447b1 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 16 Jan 2023 18:29:20 +0100 Subject: [PATCH 017/232] Update requirements-test.txt --- requirements-test.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 67c1a035..68a7cee8 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,4 @@ -codecov == 2.1.12 -coverage == 7.0.3 +coverage == 7.0.5 pre-commit == 2.21.0 psycopg2-binary == 2.9.5 -tox == 4.2.4 +tox == 4.3.1 From 04ffe5340bc78407aa929edc4191af1bafe60140 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 16 Jan 2023 18:29:24 +0100 Subject: [PATCH 018/232] Update tox.ini --- tox.ini | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index bbca6036..bd7f338f 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,13 @@ python = 3.11: py311 [testenv] +passenv = CI,GITHUB_WORKFLOW + +setenv = + sqlite: DATABASE_ENGINE=sqlite + # mysql: DATABASE_ENGINE=mysql + postgres: DATABASE_ENGINE=postgres + deps = dj22: Django == 2.2.* dj30: Django == 3.0.* @@ -20,18 +27,12 @@ deps = dj32: Django == 3.2.* dj40: Django == 4.0.* dj41: Django == 4.1.* - # mysql: mysqlclient - postgres: psycopg2-binary - coverage - codecov -setenv = - sqlite: DATABASE_ENGINE=sqlite - # mysql: DATABASE_ENGINE=mysql - postgres: DATABASE_ENGINE=postgres + -r requirements.txt + -r requirements-test.txt + commands = coverage run --append --source=admin_interface runtests.py - coverage report -m - codecov + coverage report --show-missing --ignore-errors [testenv:migrations] setenv = From 88ab3485c077814eadcd0df9e1dbc2950fc7c8a8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 16 Jan 2023 23:42:17 +0100 Subject: [PATCH 019/232] Update requirements-test.txt --- requirements-test.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 68a7cee8..d8b1ad15 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -coverage == 7.0.5 -pre-commit == 2.21.0 -psycopg2-binary == 2.9.5 -tox == 4.3.1 +coverage == 7.0.* +pre-commit == 2.21.* +psycopg2-binary == 2.9.* +tox == 4.3.* From cce1c9adaff44b84fc801947212add05716a8cdc Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 17 Jan 2023 10:04:02 +0100 Subject: [PATCH 020/232] Add `django-upgrade` to `pre-commit` hooks. --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9318615..0955ae6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,12 @@ repos: hooks: - id: pyupgrade + - repo: https://github.com/adamchainz/django-upgrade + rev: 1.12.0 + hooks: + - id: django-upgrade + args: ["--target-version", "3.2"] + - repo: https://github.com/psf/black rev: 22.12.0 hooks: From 76de3d5481a5335a65429de6cbb69281fc2a2215 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 18 Jan 2023 09:42:45 +0100 Subject: [PATCH 021/232] Run `django-upgrade` `pre-commit` hook. --- admin_interface/__init__.py | 4 ---- admin_interface/admin.py | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/admin_interface/__init__.py b/admin_interface/__init__.py index dcf03df4..e69de29b 100644 --- a/admin_interface/__init__.py +++ b/admin_interface/__init__.py @@ -1,4 +0,0 @@ -import django - -if django.VERSION < (3, 2): - default_app_config = "admin_interface.apps.AdminInterfaceConfig" diff --git a/admin_interface/admin.py b/admin_interface/admin.py index 5a36777b..9dfa4925 100644 --- a/admin_interface/admin.py +++ b/admin_interface/admin.py @@ -4,6 +4,7 @@ from admin_interface.models import Theme +@admin.register(Theme) class ThemeAdmin(admin.ModelAdmin): list_display = ( @@ -185,6 +186,3 @@ class ThemeAdmin(admin.ModelAdmin): ) save_on_top = True - - -admin.site.register(Theme, ThemeAdmin) From 176294038084aeba272ebab4ee4b073a98710d1f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 18 Jan 2023 09:59:02 +0100 Subject: [PATCH 022/232] Drop `Django 2.2` support. --- .github/workflows/test-package.yml | 4 ++-- setup.cfg | 3 +-- tox.ini | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 191b9075..a4d4539a 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -19,8 +19,8 @@ jobs: id: create_matrix with: matrix: | - python-version {3.8}, django-version {2.2,3.0,3.1,3.2}, database {sqlite,postgres} - python-version {3.9}, django-version {2.2,3.0,3.1,3.2}, database {sqlite,postgres} + python-version {3.8}, django-version {3.0,3.1,3.2}, database {sqlite,postgres} + python-version {3.9}, django-version {3.0,3.1,3.2}, database {sqlite,postgres} python-version {3.10}, django-version {3.2,4.0,4.1}, database {sqlite,postgres} python-version {3.11}, django-version {4.1}, database {sqlite,postgres} diff --git a/setup.cfg b/setup.cfg index f2e6788a..e82bab4d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,6 @@ classifiers = Development Status :: 5 - Production/Stable Environment :: Web Environment Framework :: Django - Framework :: Django :: 2.2 Framework :: Django :: 3.0 Framework :: Django :: 3.1 Framework :: Django :: 3.2 @@ -40,7 +39,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Topic :: Software Development :: Build Tools -requires = django (>= 2.2) +requires = django (>= 3.0) project_urls = Documentation = https://github.com/fabiocaccamo/%(name)s#readme Issues = https://github.com/fabiocaccamo/%(name)s/issues diff --git a/tox.ini b/tox.ini index bd7f338f..3543d960 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = - py38-{dj22,dj30,dj31,dj32}-{sqlite,postgres}, - py39-{dj22,dj30,dj31,dj32}-{sqlite,postgres}, + py38-{dj30,dj31,dj32}-{sqlite,postgres}, + py39-{dj30,dj31,dj32}-{sqlite,postgres}, py310-{dj32,dj40,dj41}-{sqlite,postgres}, py311-{dj41}-{sqlite,postgres}, @@ -21,7 +21,6 @@ setenv = postgres: DATABASE_ENGINE=postgres deps = - dj22: Django == 2.2.* dj30: Django == 3.0.* dj31: Django == 3.1.* dj32: Django == 3.2.* From 947bd4b64d13196241ea059d1a6b5681ce94b63a Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 18 Jan 2023 11:36:34 +0100 Subject: [PATCH 023/232] Rename default branch from `master` to `main`. --- .github/workflows/codeql-analysis.yml | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3abb11c9..47247924 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [ main ] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [ main ] schedule: - cron: '26 21 * * 0' diff --git a/README.md b/README.md index 308b32f3..81393248 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ [![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-admin-interface/) [![](https://pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface) [![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github)](https://github.com/fabiocaccamo/django-admin-interface/) -[![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/master/LICENSE.txt) +[![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/main/LICENSE.txt) -[![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-admin-interface/master.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-admin-interface/master) -[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-admin-interface/test-package.yml?branch=master&label=build&logo=github)](https://github.com/fabiocaccamo/django-admin-interface) +[![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-admin-interface/main.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-admin-interface/main) +[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-admin-interface/test-package.yml?branch=main&label=build&logo=github)](https://github.com/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-admin-interface?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codacy/grade/21cb657283c04e70b56fb935277a1ad1?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-admin-interface?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-admin-interface/) From d15c0c10c2ce5b10934506cad43c858bcc174ca5 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 20 Jan 2023 10:43:57 +0100 Subject: [PATCH 024/232] Update `README.md`. [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81393248..1f637154 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-admin-interface/) [![](https://pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface) -[![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github)](https://github.com/fabiocaccamo/django-admin-interface/) +[![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github)](https://github.com/fabiocaccamo/django-admin-interface/stargazers) [![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/main/LICENSE.txt) [![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-admin-interface/main.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-admin-interface/main) From ecc1cd77dee72d0be61258f993dae7aab1d1dd19 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 24 Jan 2023 18:19:04 +0100 Subject: [PATCH 025/232] Increase `flake8` checks. --- .flake8 | 2 +- .../0011_add_environment_options.py | 2 +- admin_interface/models.py | 16 ++++++++++++---- tests/test_models.py | 19 +++++++++---------- tests/test_multidb.py | 2 -- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.flake8 b/.flake8 index d3837af4..c74ed57a 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -ignore = E203, E266, E501, W503, F403, F401, F841 +ignore = W503 max-line-length = 89 max-complexity = 10 select = B,C,E,F,W,T4,B9 diff --git a/admin_interface/migrations/0011_add_environment_options.py b/admin_interface/migrations/0011_add_environment_options.py index 70f34724..ab06b9ec 100644 --- a/admin_interface/migrations/0011_add_environment_options.py +++ b/admin_interface/migrations/0011_add_environment_options.py @@ -25,7 +25,7 @@ class Migration(migrations.Migration): field=colorfield.fields.ColorField( blank=True, default="#E74C3C", - help_text="(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)", + help_text="(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)", # noqa: E501 max_length=10, verbose_name="color", ), diff --git a/admin_interface/models.py b/admin_interface/models.py index 70d6e651..c119bb89 100644 --- a/admin_interface/models.py +++ b/admin_interface/models.py @@ -107,12 +107,16 @@ class Theme(models.Model): verbose_name=_("favicon"), ) - env_name = models.CharField(blank=True, max_length=50, verbose_name=_("name")) + env_name = models.CharField( + blank=True, + max_length=50, + verbose_name=_("name"), + ) env_color = ColorField( blank=True, default="#E74C3C", help_text=_( - "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)" + "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)" # noqa: E501 ), max_length=10, verbose_name=_("color"), @@ -223,7 +227,8 @@ class Theme(models.Model): verbose_name=_("link hover color"), ) css_module_rounded_corners = models.BooleanField( - default=True, verbose_name=_("rounded corners") + default=True, + verbose_name=_("rounded corners"), ) css_generic_link_color = ColorField( @@ -285,7 +290,10 @@ class Theme(models.Model): verbose_name=_("text color"), ) - related_modal_active = models.BooleanField(default=True, verbose_name=_("active")) + related_modal_active = models.BooleanField( + default=True, + verbose_name=_("active"), + ) related_modal_background_color = ColorField( blank=True, default="#000000", diff --git a/tests/test_models.py b/tests/test_models.py index 49ff7856..bcffdba0 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,9 +1,8 @@ import random import shutil -from unittest import expectedFailure from django.conf import settings -from django.test import TestCase, TransactionTestCase +from django.test import TestCase from admin_interface.models import Theme @@ -45,25 +44,25 @@ def test_default_theme_activated_after_update_if_no_active_themes(self): def test_default_theme_activated_after_update_if_multiple_active_themes(self): Theme.objects.all().delete() - theme_1 = Theme.objects.create(name="Custom 1", active=True) - theme_2 = Theme.objects.create(name="Custom 2", active=True) - theme_3 = Theme.objects.create(name="Custom 3", active=True) + Theme.objects.create(name="Custom 1", active=True) + Theme.objects.create(name="Custom 2", active=True) + Theme.objects.create(name="Custom 3", active=True) Theme.objects.update(active=False) Theme.objects.update(active=True) self.__test_active_theme() def test_default_theme_activated_on_active_theme_deleted(self): Theme.objects.all().delete() - theme_1 = Theme.objects.create(name="Custom 1", active=True) - theme_2 = Theme.objects.create(name="Custom 2", active=True) - theme_3 = Theme.objects.create(name="Custom 3", active=True) + Theme.objects.create(name="Custom 1", active=True) + Theme.objects.create(name="Custom 2", active=True) + Theme.objects.create(name="Custom 3", active=True) Theme.objects.filter(pk=Theme.objects.get_active().pk).delete() self.__test_active_theme() def test_last_theme_activated_on_multiple_themes_created(self): Theme.objects.all().delete() - theme_1 = Theme.objects.create(name="Custom 1", active=True) - theme_2 = Theme.objects.create(name="Custom 2", active=True) + Theme.objects.create(name="Custom 1", active=True) + Theme.objects.create(name="Custom 2", active=True) theme_3 = Theme.objects.create(name="Custom 3", active=True) self.assertEqual(Theme.objects.get_active().pk, theme_3.pk) self.__test_active_theme() diff --git a/tests/test_multidb.py b/tests/test_multidb.py index 4b494895..018bcceb 100644 --- a/tests/test_multidb.py +++ b/tests/test_multidb.py @@ -1,5 +1,3 @@ -from unittest import skipIf - from django.test import TestCase from admin_interface.models import Theme From 2ebd1a7992da048820da8bde6e0c315d602b2aaa Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 25 Jan 2023 20:08:21 +0100 Subject: [PATCH 026/232] Run `pre-commit` also with `tox`. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 3543d960..35695225 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,7 @@ deps = -r requirements-test.txt commands = + pre-commit run -a coverage run --append --source=admin_interface runtests.py coverage report --show-missing --ignore-errors From 251a35f5c8701787053e29145ec441ed85c9f7e2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 25 Jan 2023 20:09:40 +0100 Subject: [PATCH 027/232] Move `flake8` config to `setup.cfg`. --- .flake8 | 5 ----- setup.cfg | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index c74ed57a..00000000 --- a/.flake8 +++ /dev/null @@ -1,5 +0,0 @@ -[flake8] -ignore = W503 -max-line-length = 89 -max-complexity = 10 -select = B,C,E,F,W,T4,B9 diff --git a/setup.cfg b/setup.cfg index e82bab4d..e6bf1968 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,3 +57,9 @@ exclude = images* scripts* tests* + +[flake8] +ignore = W503 +max-line-length = 89 +max-complexity = 10 +select = B,C,E,F,W,T4,B9 From d1914edfd9820bca6b4c555899a5796cb481eaff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 29 Jan 2023 11:29:39 +0100 Subject: [PATCH 028/232] Update pre-commit hooks. (#248) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0955ae6e..6c163ef8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: black - repo: https://github.com/pycqa/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort args: ["--profile", "black"] From eefdd615dfcededcf621f1f1e99ffc450c5217e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 20:48:28 +0100 Subject: [PATCH 029/232] Update pre-commit requirement from ==2.21.* to ==3.0.* (#250) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index d8b1ad15..8176babc 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.0.* -pre-commit == 2.21.* +pre-commit == 3.0.* psycopg2-binary == 2.9.* tox == 4.3.* From a7320c56459aac5aae55a14728dc075ac749b476 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:28:03 +0100 Subject: [PATCH 030/232] Update tox requirement from ==4.3.* to ==4.4.* (#251) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 8176babc..f2d073af 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.0.* pre-commit == 3.0.* psycopg2-binary == 2.9.* -tox == 4.3.* +tox == 4.4.* From aea00048371f01057ebc7a9ef1e9b2133c8c2bc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:54:33 +0100 Subject: [PATCH 031/232] Update coverage requirement from ==7.0.* to ==7.1.* (#249) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index f2d073af..29f13792 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -coverage == 7.0.* +coverage == 7.1.* pre-commit == 3.0.* psycopg2-binary == 2.9.* tox == 4.4.* From d0f37806c70597c9dd04bdb75933fba660751818 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Feb 2023 10:35:32 +0100 Subject: [PATCH 032/232] Update `pre-commit`. --- .pre-commit-config.yaml | 2 +- admin_interface/admin.py | 1 - admin_interface/apps.py | 1 - admin_interface/migrations/0001_initial.py | 1 - admin_interface/migrations/0002_add_related_modal.py | 1 - admin_interface/migrations/0003_add_logo_color.py | 1 - admin_interface/migrations/0004_rename_title_color.py | 1 - admin_interface/migrations/0005_add_recent_actions_visible.py | 1 - admin_interface/migrations/0006_bytes_to_str.py | 1 - admin_interface/migrations/0007_add_favicon.py | 1 - .../0008_change_related_modal_background_opacity_type.py | 1 - admin_interface/migrations/0009_add_enviroment.py | 1 - admin_interface/migrations/0010_add_localization.py | 1 - admin_interface/migrations/0011_add_environment_options.py | 1 - admin_interface/migrations/0012_update_verbose_names.py | 1 - .../migrations/0013_add_related_modal_close_button.py | 1 - admin_interface/migrations/0014_name_unique.py | 1 - admin_interface/migrations/0015_add_language_chooser_active.py | 1 - admin_interface/migrations/0016_add_language_chooser_display.py | 1 - admin_interface/migrations/0017_change_list_filter_dropdown.py | 1 - admin_interface/migrations/0018_theme_list_filter_sticky.py | 1 - admin_interface/migrations/0019_add_form_sticky.py | 1 - admin_interface/migrations/0020_module_selected_colors.py | 1 - admin_interface/migrations/0021_file_extension_validator.py | 1 - .../migrations/0022_add_logo_max_width_and_height.py | 1 - admin_interface/migrations/0023_theme_foldable_apps.py | 1 - admin_interface/migrations/0024_remove_theme_css.py | 1 - .../migrations/0025_theme_language_chooser_control.py | 1 - admin_interface/migrations/0026_theme_list_filter_highlight.py | 1 - .../migrations/0027_theme_list_filter_removal_links.py | 1 - .../migrations/0028_theme_show_fieldsets_as_tabs_and_more.py | 1 - tests/test_settings.py | 1 - 32 files changed, 1 insertion(+), 32 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c163ef8..58195744 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black diff --git a/admin_interface/admin.py b/admin_interface/admin.py index 9dfa4925..bada3701 100644 --- a/admin_interface/admin.py +++ b/admin_interface/admin.py @@ -6,7 +6,6 @@ @admin.register(Theme) class ThemeAdmin(admin.ModelAdmin): - list_display = ( "name", "active", diff --git a/admin_interface/apps.py b/admin_interface/apps.py index 15e065b6..93fe6951 100644 --- a/admin_interface/apps.py +++ b/admin_interface/apps.py @@ -3,7 +3,6 @@ class AdminInterfaceConfig(AppConfig): - name = "admin_interface" verbose_name = _("Admin Interface") default_auto_field = "django.db.models.AutoField" diff --git a/admin_interface/migrations/0001_initial.py b/admin_interface/migrations/0001_initial.py index b18ec0ac..9c545611 100644 --- a/admin_interface/migrations/0001_initial.py +++ b/admin_interface/migrations/0001_initial.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [] operations = [ diff --git a/admin_interface/migrations/0002_add_related_modal.py b/admin_interface/migrations/0002_add_related_modal.py index 94adfb1f..e6411142 100644 --- a/admin_interface/migrations/0002_add_related_modal.py +++ b/admin_interface/migrations/0002_add_related_modal.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0001_initial"), ] diff --git a/admin_interface/migrations/0003_add_logo_color.py b/admin_interface/migrations/0003_add_logo_color.py index b140e5e6..e38e3084 100644 --- a/admin_interface/migrations/0003_add_logo_color.py +++ b/admin_interface/migrations/0003_add_logo_color.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0002_add_related_modal"), ] diff --git a/admin_interface/migrations/0004_rename_title_color.py b/admin_interface/migrations/0004_rename_title_color.py index d93cd164..a514b8e3 100644 --- a/admin_interface/migrations/0004_rename_title_color.py +++ b/admin_interface/migrations/0004_rename_title_color.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0003_add_logo_color"), ] diff --git a/admin_interface/migrations/0005_add_recent_actions_visible.py b/admin_interface/migrations/0005_add_recent_actions_visible.py index e94e8dde..8f844e23 100644 --- a/admin_interface/migrations/0005_add_recent_actions_visible.py +++ b/admin_interface/migrations/0005_add_recent_actions_visible.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0004_rename_title_color"), ] diff --git a/admin_interface/migrations/0006_bytes_to_str.py b/admin_interface/migrations/0006_bytes_to_str.py index 04f119f0..30698f6f 100644 --- a/admin_interface/migrations/0006_bytes_to_str.py +++ b/admin_interface/migrations/0006_bytes_to_str.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0005_add_recent_actions_visible"), ] diff --git a/admin_interface/migrations/0007_add_favicon.py b/admin_interface/migrations/0007_add_favicon.py index 52230e3b..c405a21e 100644 --- a/admin_interface/migrations/0007_add_favicon.py +++ b/admin_interface/migrations/0007_add_favicon.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0006_bytes_to_str"), ] diff --git a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py index 2950b784..8055993f 100644 --- a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py +++ b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0007_add_favicon"), ] diff --git a/admin_interface/migrations/0009_add_enviroment.py b/admin_interface/migrations/0009_add_enviroment.py index ee085273..791375fd 100644 --- a/admin_interface/migrations/0009_add_enviroment.py +++ b/admin_interface/migrations/0009_add_enviroment.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0008_change_related_modal_background_opacity_type"), ] diff --git a/admin_interface/migrations/0010_add_localization.py b/admin_interface/migrations/0010_add_localization.py index 76645113..700ee7d8 100644 --- a/admin_interface/migrations/0010_add_localization.py +++ b/admin_interface/migrations/0010_add_localization.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0009_add_enviroment"), ] diff --git a/admin_interface/migrations/0011_add_environment_options.py b/admin_interface/migrations/0011_add_environment_options.py index ab06b9ec..0dd8101c 100644 --- a/admin_interface/migrations/0011_add_environment_options.py +++ b/admin_interface/migrations/0011_add_environment_options.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0010_add_localization"), ] diff --git a/admin_interface/migrations/0012_update_verbose_names.py b/admin_interface/migrations/0012_update_verbose_names.py index 2b8af66e..88b7e872 100644 --- a/admin_interface/migrations/0012_update_verbose_names.py +++ b/admin_interface/migrations/0012_update_verbose_names.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0011_add_environment_options"), ] diff --git a/admin_interface/migrations/0013_add_related_modal_close_button.py b/admin_interface/migrations/0013_add_related_modal_close_button.py index 1be545c2..df64e004 100644 --- a/admin_interface/migrations/0013_add_related_modal_close_button.py +++ b/admin_interface/migrations/0013_add_related_modal_close_button.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0012_update_verbose_names"), ] diff --git a/admin_interface/migrations/0014_name_unique.py b/admin_interface/migrations/0014_name_unique.py index 3c09ccc4..c4abeaed 100644 --- a/admin_interface/migrations/0014_name_unique.py +++ b/admin_interface/migrations/0014_name_unique.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0013_add_related_modal_close_button"), ] diff --git a/admin_interface/migrations/0015_add_language_chooser_active.py b/admin_interface/migrations/0015_add_language_chooser_active.py index 414f4414..2b44e31a 100644 --- a/admin_interface/migrations/0015_add_language_chooser_active.py +++ b/admin_interface/migrations/0015_add_language_chooser_active.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0014_name_unique"), ] diff --git a/admin_interface/migrations/0016_add_language_chooser_display.py b/admin_interface/migrations/0016_add_language_chooser_display.py index 797cd3d4..88ceddd1 100644 --- a/admin_interface/migrations/0016_add_language_chooser_display.py +++ b/admin_interface/migrations/0016_add_language_chooser_display.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0015_add_language_chooser_active"), ] diff --git a/admin_interface/migrations/0017_change_list_filter_dropdown.py b/admin_interface/migrations/0017_change_list_filter_dropdown.py index 0030e259..010224ff 100644 --- a/admin_interface/migrations/0017_change_list_filter_dropdown.py +++ b/admin_interface/migrations/0017_change_list_filter_dropdown.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0016_add_language_chooser_display"), ] diff --git a/admin_interface/migrations/0018_theme_list_filter_sticky.py b/admin_interface/migrations/0018_theme_list_filter_sticky.py index 82192616..c72d8fc6 100644 --- a/admin_interface/migrations/0018_theme_list_filter_sticky.py +++ b/admin_interface/migrations/0018_theme_list_filter_sticky.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0017_change_list_filter_dropdown"), ] diff --git a/admin_interface/migrations/0019_add_form_sticky.py b/admin_interface/migrations/0019_add_form_sticky.py index 90cc143b..871a5fb9 100644 --- a/admin_interface/migrations/0019_add_form_sticky.py +++ b/admin_interface/migrations/0019_add_form_sticky.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0018_theme_list_filter_sticky"), ] diff --git a/admin_interface/migrations/0020_module_selected_colors.py b/admin_interface/migrations/0020_module_selected_colors.py index 631fcd1c..69c73b72 100644 --- a/admin_interface/migrations/0020_module_selected_colors.py +++ b/admin_interface/migrations/0020_module_selected_colors.py @@ -12,7 +12,6 @@ def default_link_selected(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0019_add_form_sticky"), ] diff --git a/admin_interface/migrations/0021_file_extension_validator.py b/admin_interface/migrations/0021_file_extension_validator.py index 8cc657b1..ddf106d8 100644 --- a/admin_interface/migrations/0021_file_extension_validator.py +++ b/admin_interface/migrations/0021_file_extension_validator.py @@ -3,7 +3,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0020_module_selected_colors"), ] diff --git a/admin_interface/migrations/0022_add_logo_max_width_and_height.py b/admin_interface/migrations/0022_add_logo_max_width_and_height.py index 8d6b3652..708329b2 100644 --- a/admin_interface/migrations/0022_add_logo_max_width_and_height.py +++ b/admin_interface/migrations/0022_add_logo_max_width_and_height.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0021_file_extension_validator"), ] diff --git a/admin_interface/migrations/0023_theme_foldable_apps.py b/admin_interface/migrations/0023_theme_foldable_apps.py index 9ac21a9e..c96fdcc0 100644 --- a/admin_interface/migrations/0023_theme_foldable_apps.py +++ b/admin_interface/migrations/0023_theme_foldable_apps.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0022_add_logo_max_width_and_height"), ] diff --git a/admin_interface/migrations/0024_remove_theme_css.py b/admin_interface/migrations/0024_remove_theme_css.py index e4ecc5ff..827241e8 100644 --- a/admin_interface/migrations/0024_remove_theme_css.py +++ b/admin_interface/migrations/0024_remove_theme_css.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0023_theme_foldable_apps"), ] diff --git a/admin_interface/migrations/0025_theme_language_chooser_control.py b/admin_interface/migrations/0025_theme_language_chooser_control.py index a01953c2..815d4676 100644 --- a/admin_interface/migrations/0025_theme_language_chooser_control.py +++ b/admin_interface/migrations/0025_theme_language_chooser_control.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0024_remove_theme_css"), ] diff --git a/admin_interface/migrations/0026_theme_list_filter_highlight.py b/admin_interface/migrations/0026_theme_list_filter_highlight.py index 9f126c03..271d7480 100644 --- a/admin_interface/migrations/0026_theme_list_filter_highlight.py +++ b/admin_interface/migrations/0026_theme_list_filter_highlight.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0025_theme_language_chooser_control"), ] diff --git a/admin_interface/migrations/0027_theme_list_filter_removal_links.py b/admin_interface/migrations/0027_theme_list_filter_removal_links.py index 860e21b5..7d97fe7f 100644 --- a/admin_interface/migrations/0027_theme_list_filter_removal_links.py +++ b/admin_interface/migrations/0027_theme_list_filter_removal_links.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0026_theme_list_filter_highlight"), ] diff --git a/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py b/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py index d6cb7475..18999f19 100644 --- a/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py +++ b/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("admin_interface", "0027_theme_list_filter_removal_links"), ] diff --git a/tests/test_settings.py b/tests/test_settings.py index ffbae857..4a7e64eb 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -6,7 +6,6 @@ class AdminInterfaceSettingsTestCase(TestCase): - DJANGO_APPS = [ "django.contrib.admin", "django.contrib.auth", From 91b0e1d1584a7a6c5fc394159da701536f52ebf1 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Feb 2023 10:35:38 +0100 Subject: [PATCH 033/232] Update test-package.yml --- .github/workflows/test-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index a4d4539a..eb6fdc76 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -43,7 +43,7 @@ jobs: - name: Install tools needed run: | sudo apt install gettext - pip install pip --upgrade + python -m pip install --upgrade pip pip install tox - name: Check migrations @@ -107,6 +107,7 @@ jobs: DATABASE_ENGINE: ${{ matrix.database }} run: | coverage run --append --source=admin_interface runtests.py + coverage report --show-missing coverage xml -o ./coverage.xml - name: Upload coverage to Codecov From e1b997f1bfb22857d00d928c1241fbe5d234f76c Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Feb 2023 16:41:08 +0100 Subject: [PATCH 034/232] Update dependabot.yml --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 97875542..39065537 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,8 +5,10 @@ updates: directory: "/" schedule: interval: "weekly" + open-pull-requests-limit: 100 - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + open-pull-requests-limit: 100 From 00bedb30c28375cdf922cd42ad76124cfc98cf68 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 9 Feb 2023 18:55:21 +0100 Subject: [PATCH 035/232] Run `flake8` also on tests files. --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58195744..8e610556 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,6 @@ repos: rev: 6.0.0 hooks: - id: flake8 - exclude: "setup.py" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 From e2b23c238f76d87d31d0e52b28fa99e75da98d74 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 9 Feb 2023 18:56:09 +0100 Subject: [PATCH 036/232] Set `Black` pre-commit hook `line-length` option value. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 90ec106b..b49b39de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] +line-length = 89 include = '\.pyi?$' exclude = ''' /( From 71cc60bea30db2017388390163a37bb07b77ddd8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 9 Feb 2023 19:14:33 +0100 Subject: [PATCH 037/232] Add `metadata` module and read package attrs dynamically. --- admin_interface/__init__.py | 17 ++++++++++ admin_interface/metadata.py | 10 ++++++ .../templatetags/admin_interface_tags.py | 2 +- admin_interface/version.py | 1 - setup.cfg | 12 +++---- tests/test_metadata.py | 34 +++++++++++++++++++ tests/test_templatetags.py | 2 +- 7 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 admin_interface/metadata.py delete mode 100644 admin_interface/version.py create mode 100644 tests/test_metadata.py diff --git a/admin_interface/__init__.py b/admin_interface/__init__.py index e69de29b..d64097ee 100644 --- a/admin_interface/__init__.py +++ b/admin_interface/__init__.py @@ -0,0 +1,17 @@ +from admin_interface.metadata import ( + __author__, + __copyright__, + __description__, + __license__, + __title__, + __version__, +) + +__all__ = [ + "__author__", + "__copyright__", + "__description__", + "__license__", + "__title__", + "__version__", +] diff --git a/admin_interface/metadata.py b/admin_interface/metadata.py new file mode 100644 index 00000000..289885b2 --- /dev/null +++ b/admin_interface/metadata.py @@ -0,0 +1,10 @@ +__author__ = "Fabio Caccamo" +__copyright__ = "Copyright (c) 2016-present Fabio Caccamo" +__description__ = ( + "django's default admin interface with superpowers - " + "customizable themes, popup windows replaced by modals and many other features." +) +__email__ = "fabio.caccamo@gmail.com" +__license__ = "MIT" +__title__ = "django-admin-interface" +__version__ = "0.24.2" diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index a93b5ef7..73d41fed 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -8,8 +8,8 @@ from django.utils import translation from admin_interface.cache import get_cached_active_theme, set_cached_active_theme +from admin_interface.metadata import __version__ from admin_interface.models import Theme -from admin_interface.version import __version__ register = template.Library() diff --git a/admin_interface/version.py b/admin_interface/version.py deleted file mode 100644 index 71db8a03..00000000 --- a/admin_interface/version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.24.2" diff --git a/setup.cfg b/setup.cfg index e6bf1968..4a047653 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] name = django-admin-interface -version = attr: admin_interface.version.__version__ -author = Fabio Caccamo -author_email = fabio.caccamo@gmail.com -maintainer = Fabio Caccamo -maintainer_email = fabio.caccamo@gmail.com -description = django-admin-interface is a modern responsive flat admin interface customizable by the admin itself. +version = attr: admin_interface.metadata.__version__ +author = attr: admin_interface.metadata.__author__ +author_email = attr: admin_interface.metadata.__email__ +maintainer = attr: admin_interface.metadata.__author__ +maintainer_email = attr: admin_interface.metadata.__email__ +description = attr: admin_interface.metadata.__description__ keywords = django admin diff --git a/tests/test_metadata.py b/tests/test_metadata.py new file mode 100644 index 00000000..bf190846 --- /dev/null +++ b/tests/test_metadata.py @@ -0,0 +1,34 @@ +import re + +from django.test import TestCase + +from admin_interface.metadata import ( + __author__, + __copyright__, + __description__, + __email__, + __license__, + __title__, + __version__, +) + + +class MetadataTestCase(TestCase): + """ + This class describes a metadata test case. + """ + + def test_metadata(self): + self.assertTrue(isinstance(__author__, str)) + self.assertTrue(isinstance(__copyright__, str)) + self.assertTrue(isinstance(__description__, str)) + self.assertTrue(isinstance(__email__, str)) + self.assertTrue(isinstance(__license__, str)) + self.assertTrue(isinstance(__title__, str)) + self.assertTrue(isinstance(__version__, str)) + + def test_version(self): + v = __version__ + v_re = re.compile(r"^([0-9]+)(\.([0-9]+)){1,2}$") + v_match = v_re.match(v) + self.assertTrue(v_match is not None) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 9cf8788a..4b123a32 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -6,10 +6,10 @@ from django.test import TestCase, override_settings from django.test.client import RequestFactory +from admin_interface.metadata import __version__ from admin_interface.models import Theme from admin_interface.templatetags import admin_interface_tags as templatetags from admin_interface.templatetags.admin_interface_tags import hash_string -from admin_interface.version import __version__ class AdminInterfaceTemplateTagsTestCase(TestCase): From fa81b2ea5eb7ea781ccfc17449fd396475973ceb Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 9 Feb 2023 19:14:51 +0100 Subject: [PATCH 038/232] Reformat code. --- admin_interface/migrations/0010_add_localization.py | 4 +--- .../migrations/0013_add_related_modal_close_button.py | 4 +--- tests/settings.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/admin_interface/migrations/0010_add_localization.py b/admin_interface/migrations/0010_add_localization.py index 700ee7d8..7d5dc366 100644 --- a/admin_interface/migrations/0010_add_localization.py +++ b/admin_interface/migrations/0010_add_localization.py @@ -45,9 +45,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="name", - field=models.CharField( - default="Django", max_length=50, verbose_name="name" - ), + field=models.CharField(default="Django", max_length=50, verbose_name="name"), ), migrations.AlterField( model_name="theme", diff --git a/admin_interface/migrations/0013_add_related_modal_close_button.py b/admin_interface/migrations/0013_add_related_modal_close_button.py index df64e004..04aa5179 100644 --- a/admin_interface/migrations/0013_add_related_modal_close_button.py +++ b/admin_interface/migrations/0013_add_related_modal_close_button.py @@ -10,8 +10,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="related_modal_close_button_visible", - field=models.BooleanField( - default=True, verbose_name="close button visible" - ), + field=models.BooleanField(default=True, verbose_name="close button visible"), ), ] diff --git a/tests/settings.py b/tests/settings.py index 9b57d540..d8d666ad 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -83,9 +83,7 @@ database_config["postgres_replica"]["HOST"] = "127.0.0.1" database_config["postgres_replica"]["PORT"] = "5432" -replica_engine = ( - "postgres_replica" if database_engine == "postgres" else database_engine -) +replica_engine = "postgres_replica" if database_engine == "postgres" else database_engine DATABASES = { "default": database_config.get(database_engine), From 6147fb65e6ce3a1bce36506776f1eeba7c969f1d Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 9 Feb 2023 19:16:03 +0100 Subject: [PATCH 039/232] Add warning to README installation instructions. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1f637154..d7b2cd4d 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ SILENCED_SYSTEM_CHECKS = ["security.W019"] - Run `python manage.py collectstatic` - Restart your application server +> **Warning**: if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = "SAMEORIGIN"` setting. + #### Optional features To make a fieldset start expanded with a `Hide` button to collapse: From 81ab67953af25604ca2c99f40728ef08bbe4c718 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 10 Feb 2023 16:21:36 +0100 Subject: [PATCH 040/232] Upgrade syntax for `Python >= 3.8`. --- .pre-commit-config.yaml | 1 + tests/test_fixtures.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e610556..812b3d5f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,7 @@ repos: rev: v3.3.1 hooks: - id: pyupgrade + args: ["--py38-plus"] - repo: https://github.com/adamchainz/django-upgrade rev: 1.12.0 diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index 4a282777..9e1768ee 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -12,7 +12,7 @@ def tearDown(self): pass def __load_theme(self, theme_name): - call_command("loaddata", "admin_interface_theme_{}.json".format(theme_name)) + call_command("loaddata", f"admin_interface_theme_{theme_name}.json") def test_import_initial_data(self): call_command("loaddata", "initial_data.json") From 191d82a5c2d2f7328e173ec2d7ab6e7e7de45d64 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 13 Feb 2023 15:52:13 +0100 Subject: [PATCH 041/232] Set max line length to `88`. --- admin_interface/migrations/0010_add_localization.py | 4 +++- .../migrations/0013_add_related_modal_close_button.py | 4 +++- pyproject.toml | 2 +- setup.cfg | 2 +- tests/settings.py | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/admin_interface/migrations/0010_add_localization.py b/admin_interface/migrations/0010_add_localization.py index 7d5dc366..700ee7d8 100644 --- a/admin_interface/migrations/0010_add_localization.py +++ b/admin_interface/migrations/0010_add_localization.py @@ -45,7 +45,9 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="name", - field=models.CharField(default="Django", max_length=50, verbose_name="name"), + field=models.CharField( + default="Django", max_length=50, verbose_name="name" + ), ), migrations.AlterField( model_name="theme", diff --git a/admin_interface/migrations/0013_add_related_modal_close_button.py b/admin_interface/migrations/0013_add_related_modal_close_button.py index 04aa5179..df64e004 100644 --- a/admin_interface/migrations/0013_add_related_modal_close_button.py +++ b/admin_interface/migrations/0013_add_related_modal_close_button.py @@ -10,6 +10,8 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="related_modal_close_button_visible", - field=models.BooleanField(default=True, verbose_name="close button visible"), + field=models.BooleanField( + default=True, verbose_name="close button visible" + ), ), ] diff --git a/pyproject.toml b/pyproject.toml index b49b39de..22fd9e74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] -line-length = 89 +line-length = 88 include = '\.pyi?$' exclude = ''' /( diff --git a/setup.cfg b/setup.cfg index 4a047653..59649910 100644 --- a/setup.cfg +++ b/setup.cfg @@ -60,6 +60,6 @@ exclude = [flake8] ignore = W503 -max-line-length = 89 +max-line-length = 88 max-complexity = 10 select = B,C,E,F,W,T4,B9 diff --git a/tests/settings.py b/tests/settings.py index d8d666ad..9b57d540 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -83,7 +83,9 @@ database_config["postgres_replica"]["HOST"] = "127.0.0.1" database_config["postgres_replica"]["PORT"] = "5432" -replica_engine = "postgres_replica" if database_engine == "postgres" else database_engine +replica_engine = ( + "postgres_replica" if database_engine == "postgres" else database_engine +) DATABASES = { "default": database_config.get(database_engine), From bb9585c465dbaf0d308f78ac0d8ab91e9e400d38 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 14 Feb 2023 09:48:04 +0100 Subject: [PATCH 042/232] Update `README.md`. [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7b2cd4d..d9d238e7 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ X_FRAME_OPTIONS = "SAMEORIGIN" SILENCED_SYSTEM_CHECKS = ["security.W019"] ``` - Run `python manage.py migrate` -- Run `python manage.py collectstatic` +- Run `python manage.py collectstatic --clear` - Restart your application server > **Warning**: if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = "SAMEORIGIN"` setting. From 7926340d24b219386da276117677debf17a99b55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 18 Feb 2023 08:10:06 +0100 Subject: [PATCH 043/232] Update pre-commit hooks. (#260) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 812b3d5f..5b7b2b00 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: args: ["--py38-plus"] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.12.0 + rev: 1.13.0 hooks: - id: django-upgrade args: ["--target-version", "3.2"] From 9b7e963f4637022b378dcceea426bf18f31804ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:12:52 +0100 Subject: [PATCH 044/232] Update coverage requirement from ==7.1.* to ==7.2.* (#264) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 29f13792..77254a86 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -coverage == 7.1.* +coverage == 7.2.* pre-commit == 3.0.* psycopg2-binary == 2.9.* tox == 4.4.* From 522e4d20bcbc3f00bb8d2be2807f637350747daa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:44:20 +0100 Subject: [PATCH 045/232] Update pre-commit requirement from ==3.0.* to ==3.1.* (#265) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Fabio Caccamo --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 77254a86..1758db34 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* -pre-commit == 3.0.* +pre-commit == 3.1.* psycopg2-binary == 2.9.* tox == 4.4.* From 4deefc20b7123e5feab170826b6bbdfd3ea09539 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 1 Mar 2023 17:54:58 +0100 Subject: [PATCH 046/232] Add `flake8-bugbear` to `pre-commit`. --- .pre-commit-config.yaml | 2 ++ admin_interface/migrations/0011_add_environment_options.py | 5 ++++- admin_interface/models.py | 3 ++- tests/test_models.py | 2 +- tests/test_multidb.py | 3 ++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5b7b2b00..afb4c0e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,8 @@ repos: rev: 6.0.0 hooks: - id: flake8 + additional_dependencies: + - flake8-bugbear - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/admin_interface/migrations/0011_add_environment_options.py b/admin_interface/migrations/0011_add_environment_options.py index 0dd8101c..a2ce25e4 100644 --- a/admin_interface/migrations/0011_add_environment_options.py +++ b/admin_interface/migrations/0011_add_environment_options.py @@ -24,7 +24,10 @@ class Migration(migrations.Migration): field=colorfield.fields.ColorField( blank=True, default="#E74C3C", - help_text="(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)", # noqa: E501 + help_text=( + "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, " + "green: #2ECC71, blue: #3498DB)" + ), max_length=10, verbose_name="color", ), diff --git a/admin_interface/models.py b/admin_interface/models.py index c119bb89..646396bc 100644 --- a/admin_interface/models.py +++ b/admin_interface/models.py @@ -116,7 +116,8 @@ class Theme(models.Model): blank=True, default="#E74C3C", help_text=_( - "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)" # noqa: E501 + "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, " + "green: #2ECC71, blue: #3498DB)" ), max_length=10, verbose_name=_("color"), diff --git a/tests/test_models.py b/tests/test_models.py index bcffdba0..5754e967 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -75,7 +75,7 @@ def test_last_theme_activated_on_multiple_themes_activated(self): theme_4 = Theme.objects.create(name="Custom 4", active=True) theme_5 = Theme.objects.create(name="Custom 5", active=True) themes = [theme_1, theme_2, theme_3, theme_4, theme_5] - for i in range(5): + for _ in range(5): random.shuffle(themes) for theme in themes: theme.set_active() diff --git a/tests/test_multidb.py b/tests/test_multidb.py index 018bcceb..e315d7d6 100644 --- a/tests/test_multidb.py +++ b/tests/test_multidb.py @@ -1,4 +1,5 @@ from django.test import TestCase +from django.test.testcases import DatabaseOperationForbidden from admin_interface.models import Theme @@ -22,7 +23,7 @@ def test_dbrouter_selects_correct_db(self): assert db_for_theme == "replica" def test_dbrouter_errors_when_fetching_from_default(self): - with self.assertRaises(Exception): + with self.assertRaises(DatabaseOperationForbidden): Theme.objects.get_active() def test_dbrouter_fetches_db(self): From a3737c9892a71813a6ab22a6ab0db714b432c10c Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 2 Mar 2023 14:09:38 +0100 Subject: [PATCH 047/232] Fix multidb tests. --- tests/test_multidb.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_multidb.py b/tests/test_multidb.py index e315d7d6..456422e7 100644 --- a/tests/test_multidb.py +++ b/tests/test_multidb.py @@ -1,10 +1,14 @@ from django.test import TestCase -from django.test.testcases import DatabaseOperationForbidden from admin_interface.models import Theme from .routers import DatabaseAppsRouter +try: + from django.test.testcases import DatabaseOperationForbidden +except ImportError: + DatabaseOperationForbidden = AssertionError + class AdminInterfaceModelsWithDBRoutingTestCase(TestCase): databases = ["replica"] @@ -12,7 +16,7 @@ class AdminInterfaceModelsWithDBRoutingTestCase(TestCase): def test_standard_dbrouter(self): router = DatabaseAppsRouter() db_for_theme = router.db_for_read(Theme) - assert db_for_theme == "default" + self.assertEqual(db_for_theme, "default") def test_dbrouter_selects_correct_db(self): DATABASE_APPS_MAPPING = { @@ -20,7 +24,7 @@ def test_dbrouter_selects_correct_db(self): } router = DatabaseAppsRouter(db_map=DATABASE_APPS_MAPPING) db_for_theme = router.db_for_read(Theme) - assert db_for_theme == "replica" + self.assertEqual(db_for_theme, "replica") def test_dbrouter_errors_when_fetching_from_default(self): with self.assertRaises(DatabaseOperationForbidden): From d7436e6abc7b0739ff894b4365d6461d9fa74e84 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 7 Mar 2023 00:59:03 +0100 Subject: [PATCH 048/232] Update pull request template. [ci skip] --- .github/pull_request_template.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7db9c589..98d5f60e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,6 @@ --- name: Pull request about: Submit a pull request for this project -title: '' assignees: fabiocaccamo --- @@ -14,6 +13,5 @@ assignees: fabiocaccamo **Checklist before requesting a review** - [ ] I have performed a self-review of my code. -- [ ] I have added torough tests for the proposed changes. +- [ ] I have added tests for the proposed changes. - [ ] I have run the tests and there are not errors. -- [ ] I have updated translation files. From 703fef4c4c6101b38003c462f561bc7aa6f4d87f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 7 Mar 2023 01:42:15 +0100 Subject: [PATCH 049/232] Fix `setup.cfg` metadata. --- setup.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 59649910..9cce6c05 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] name = django-admin-interface version = attr: admin_interface.metadata.__version__ -author = attr: admin_interface.metadata.__author__ -author_email = attr: admin_interface.metadata.__email__ -maintainer = attr: admin_interface.metadata.__author__ -maintainer_email = attr: admin_interface.metadata.__email__ -description = attr: admin_interface.metadata.__description__ +author = Fabio Caccamo +author_email = fabio.caccamo@gmail.com +maintainer = Fabio Caccamo +maintainer_email = fabio.caccamo@gmail.com +description = django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features. keywords = django admin From d42f69cee79bea476b4b4cabfb34941e953e14c2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 13 Mar 2023 15:27:43 +0100 Subject: [PATCH 050/232] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d9d238e7..a1286d9d 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,9 @@ python -m pip install --upgrade pip # install requirements pip install -r requirements.txt -r requirements-test.txt +# install pre-commit to run formatters and linters +pre-commit install --install-hooks + # run tests tox # or From 9a0264ca08c3e09033faad61e8e491dadd151e8a Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 14 Mar 2023 00:58:45 +0100 Subject: [PATCH 051/232] Update tox.ini --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 35695225..a99ac87f 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,7 @@ deps = -r requirements.txt allowlist_externals = git commands = - python -m django makemessages --all --add-location=file - python -m django compilemessages --ignore ".tox" --ignore ".venv" --ignore "build" --ignore "venv" + python -m django makemessages --ignore ".tox" --ignore "venv" --all --add-location "file" --extension "html,py" + python -m django compilemessages --ignore ".tox" --ignore "venv" git diff admin_interface/locale/ git diff-index --quiet HEAD admin_interface/locale/ From cf100542aac7a483f76c4eff3470be26ffc6fb43 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 14 Mar 2023 00:58:53 +0100 Subject: [PATCH 052/232] Update README.md --- README.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a1286d9d..87e8d650 100644 --- a/README.md +++ b/README.md @@ -64,26 +64,22 @@ SILENCED_SYSTEM_CHECKS = ["security.W019"] - Run `python manage.py collectstatic --clear` - Restart your application server -> **Warning**: if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = "SAMEORIGIN"` setting. +> **Warning** - if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = "SAMEORIGIN"` setting. -#### Optional features - -To make a fieldset start expanded with a `Hide` button to collapse: +### Optional features +To make a fieldset start expanded with a `Hide` button to collapse, add the class `"expanded"` to its classes: ```python +class MyModelAdmin(admin.ModelAdmin): + # ... fieldsets = [ ("Section title", { "classes": ("collapse", "expanded"), "fields": (...), }), ] + # ... ``` -#### Upgrade -- Run `pip install django-admin-interface --upgrade` -- Run `python manage.py migrate` -- Run `python manage.py collectstatic --clear` -- Restart your application server - ## Optional themes This package ships with optional themes as fixtures, they can be installed using the [loaddata admin command](https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata). Optional themes are activated on installation. @@ -168,6 +164,22 @@ You can add **theme support to existing third-party libraries** using the follow ###### Admin theme customization ![django-admin-interface_theme_customization](https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif) +## Localization +At the moment, this package supports has been translated into the following languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr`. + +### Translate into another language + +- Run `python -m django makemessages --ignore "venv" --locale "it"` *(example for Italian localization)* + +- Update translations in `admin_interface/locale/it/LC_MESSAGES/django.po` + +- Run `python -m django compilemessages --ignore ".tox" --ignore "venv"` + +### Update translations + +If you do some changes to the project, remember to update translations, because if the translations files are not up-to-date, the `lint` step in the CI will fail: +- Run `tox -e translations` + ## FAQ ### Custom `base-site.html` @@ -232,8 +244,6 @@ python runtests.py # or python -m django test --settings "tests.settings" ``` -### Update translations -- Run `tox -e translations` *(if the translations files are not up-to-date, the `lint` step in the CI will fail)* ## Contributing Contributions are always welcome, please follow these steps for submitting good quality PRs: From 6e26a2733692368a8359d3133d027d34fa5eaa21 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 14 Mar 2023 01:00:06 +0100 Subject: [PATCH 053/232] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87e8d650..2963f8fd 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ At the moment, this package supports has been translated into the following lang ### Translate into another language -- Run `python -m django makemessages --ignore "venv" --locale "it"` *(example for Italian localization)* +- Run `python -m django makemessages --ignore ".tox" --ignore "venv" --locale "it"` *(example for Italian localization)* - Update translations in `admin_interface/locale/it/LC_MESSAGES/django.po` From 10b3adbd891837c02a3669298d69a0a0ae7fe5d4 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 14 Mar 2023 01:05:21 +0100 Subject: [PATCH 054/232] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2963f8fd..54076d19 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ At the moment, this package supports has been translated into the following lang ### Translate into another language -- Run `python -m django makemessages --ignore ".tox" --ignore "venv" --locale "it"` *(example for Italian localization)* +- Run `python -m django makemessages --ignore ".tox" --ignore "venv" --add-location "file" --extension "html,py" --locale "it"` *(example for Italian localization)* - Update translations in `admin_interface/locale/it/LC_MESSAGES/django.po` From 3ed84fb071a1bdf620713af0f3a99fe7a2bc71fb Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 15 Mar 2023 03:15:45 +0100 Subject: [PATCH 055/232] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54076d19..9120456b 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ You can add **theme support to existing third-party libraries** using the follow ![django-admin-interface_theme_customization](https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif) ## Localization -At the moment, this package supports has been translated into the following languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr`. +At the moment, this package has been translated into the following languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr`. ### Translate into another language From 7b12fea8b33f03aeedbfb3d1ccba326dd0d086a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:10:22 +0100 Subject: [PATCH 056/232] Update pre-commit requirement from ==3.1.* to ==3.2.* (#266) Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 1758db34..bfd89c5b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* -pre-commit == 3.1.* +pre-commit == 3.2.* psycopg2-binary == 2.9.* tox == 4.4.* From 64f3779f4ca6fa71b7b7d83b85c7aa0162470fd8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 20 Mar 2023 21:12:31 +0100 Subject: [PATCH 057/232] Update dependabot.yml --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 39065537..ee78935f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,12 @@ updates: directory: "/" schedule: interval: "weekly" + day: "friday" open-pull-requests-limit: 100 - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + day: "friday" open-pull-requests-limit: 100 From 84c7cd4582b86401cadfe1f0afc40a2e656046d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:43:05 +0200 Subject: [PATCH 058/232] Update pre-commit hooks. (#268) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index afb4c0e5..8ba8f30f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black From 26368a3e05c2fadc2ca1da9a8a18144c20a14504 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:45:18 +0200 Subject: [PATCH 059/232] [pre-commit.ci] pre-commit autoupdate (#269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From 4148f6ece9f2cfeceb46d4e0f6c043af046a44aa Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 5 Apr 2023 17:42:11 +0200 Subject: [PATCH 060/232] Replace `flake8` with `Ruff`. --- .pre-commit-config.yaml | 8 +++----- pyproject.toml | 15 +++++++++++++++ setup.cfg | 6 ------ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ba8f30f..41cba362 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,12 +25,10 @@ repos: - id: isort args: ["--profile", "black"] - - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.261 hooks: - - id: flake8 - additional_dependencies: - - flake8-bugbear + - id: ruff - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/pyproject.toml b/pyproject.toml index 22fd9e74..11c1b4ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,3 +19,18 @@ exclude = ''' | venv )/ ''' + +[tool.ruff] +ignore = [] +line-length = 88 +select = [ + "B", + "B9", + "C", + "E", + "F", + "W", +] + +[tool.ruff.mccabe] +max-complexity = 10 diff --git a/setup.cfg b/setup.cfg index 9cce6c05..9418be27 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,9 +57,3 @@ exclude = images* scripts* tests* - -[flake8] -ignore = W503 -max-line-length = 88 -max-complexity = 10 -select = B,C,E,F,W,T4,B9 From 2b21b169294e92b35f32b8ac8f86d29350a13656 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 7 Apr 2023 00:51:06 +0200 Subject: [PATCH 061/232] Switch from `setup.cfg` to `pyproject.toml`. --- pyproject.toml | 75 ++++++++++++++++++++++++++++++++++++++++++++------ setup.cfg | 59 --------------------------------------- 2 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 11c1b4ac..ce5dc8c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,66 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" +[project] +name = "django-admin-interface" +description = "django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features." +authors = [ + { name = "Fabio Caccamo", email = "fabio.caccamo@gmail.com" }, +] +keywords = [ + "django", + "admin", + "interface", + "responsive", + "flat", + "theme", + "custom", + "ui", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Software Development :: Build Tools", +] +dependencies = [ + "django-colorfield >= 0.8.0, < 1.0.0", +] +dynamic = ["version"] +maintainers = [ + { name = "Fabio Caccamo", email = "fabio.caccamo@gmail.com" }, +] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.license] +file = "LICENSE.txt" +content-type = "text/plain" + +[project.urls] +Homepage = "https://github.com/fabiocaccamo/django-admin-interface" +Download = "https://github.com/fabiocaccamo/django-admin-interface/releases" +Documentation = "https://github.com/fabiocaccamo/django-admin-interface#readme" +Issues = "https://github.com/fabiocaccamo/django-admin-interface/issues" +Funding = "https://github.com/sponsors/fabiocaccamo/" +Twitter = "https://twitter.com/fabiocaccamo" + [tool.black] line-length = 88 include = '\.pyi?$' @@ -23,14 +83,13 @@ exclude = ''' [tool.ruff] ignore = [] line-length = 88 -select = [ - "B", - "B9", - "C", - "E", - "F", - "W", -] +select = ["B", "B9", "C", "E", "F", "W"] [tool.ruff.mccabe] max-complexity = 10 + +[tool.setuptools.packages.find] +include = ["admin_interface*"] + +[tool.setuptools.dynamic.version] +attr = "admin_interface.metadata.__version__" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9418be27..00000000 --- a/setup.cfg +++ /dev/null @@ -1,59 +0,0 @@ -[metadata] -name = django-admin-interface -version = attr: admin_interface.metadata.__version__ -author = Fabio Caccamo -author_email = fabio.caccamo@gmail.com -maintainer = Fabio Caccamo -maintainer_email = fabio.caccamo@gmail.com -description = django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features. -keywords = - django - admin - interface - responsive - flat - theme - custom - ui -url = https://github.com/fabiocaccamo/%(name)s -download_url = https://github.com/fabiocaccamo/%(name)s/releases -license = MIT -long_description = file: README.md -long_description_content_type = text/markdown -classifiers = - Development Status :: 5 - Production/Stable - Environment :: Web Environment - Framework :: Django - Framework :: Django :: 3.0 - Framework :: Django :: 3.1 - Framework :: Django :: 3.2 - Framework :: Django :: 4.0 - Framework :: Django :: 4.1 - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Topic :: Software Development :: Build Tools -requires = django (>= 3.0) -project_urls = - Documentation = https://github.com/fabiocaccamo/%(name)s#readme - Issues = https://github.com/fabiocaccamo/%(name)s/issues - Funding = https://github.com/sponsors/fabiocaccamo/ - Twitter = https://twitter.com/fabiocaccamo - -[options] -packages = find: -install_requires = django-colorfield >= 0.8.0, < 1.0.0 -include_package_data = True - -[options.packages.find] -exclude = - docs* - images* - scripts* - tests* From 4668f27c92a7849d128b0c347f0bb4b4a18c5b18 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 7 Apr 2023 01:01:44 +0200 Subject: [PATCH 062/232] Add `Django 4.2` support. --- .github/workflows/test-package.yml | 8 ++++---- pyproject.toml | 1 + tox.ini | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index eb6fdc76..43c03a8e 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -19,10 +19,10 @@ jobs: id: create_matrix with: matrix: | - python-version {3.8}, django-version {3.0,3.1,3.2}, database {sqlite,postgres} - python-version {3.9}, django-version {3.0,3.1,3.2}, database {sqlite,postgres} - python-version {3.10}, django-version {3.2,4.0,4.1}, database {sqlite,postgres} - python-version {3.11}, django-version {4.1}, database {sqlite,postgres} + python-version {3.8}, django-version {3.0, 3.1, 3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} + python-version {3.9}, django-version {3.0, 3.1, 3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} + python-version {3.10}, django-version {3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} + python-version {3.11}, django-version {4.1, 4.2}, database {sqlite, postgres} outputs: matrix: ${{ steps.create_matrix.outputs.matrix }} diff --git a/pyproject.toml b/pyproject.toml index ce5dc8c7..52205b90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", diff --git a/tox.ini b/tox.ini index a99ac87f..f14cce71 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] envlist = - py38-{dj30,dj31,dj32}-{sqlite,postgres}, - py39-{dj30,dj31,dj32}-{sqlite,postgres}, - py310-{dj32,dj40,dj41}-{sqlite,postgres}, - py311-{dj41}-{sqlite,postgres}, + py38-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite,postgres}, + py39-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite,postgres}, + py310-{dj32,dj40,dj41,dj42}-{sqlite,postgres}, + py311-{dj41,dj42}-{sqlite,postgres}, [gh-actions] python = @@ -26,6 +26,7 @@ deps = dj32: Django == 3.2.* dj40: Django == 4.0.* dj41: Django == 4.1.* + dj42: Django == 4.2.* -r requirements.txt -r requirements-test.txt From 9ddb23053f5dacdedcbe572008c8d782dd3deb91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Apr 2023 17:28:54 +0200 Subject: [PATCH 063/232] Bump peter-evans/create-pull-request from 4 to 5 (#270) --- .github/workflows/pre-commit-autoupdate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 14cb49ac..924f4c00 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -16,7 +16,7 @@ jobs: with: python-version: '3.x' - uses: browniebroke/pre-commit-autoupdate-action@main - - uses: peter-evans/create-pull-request@v4 + - uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} branch: update/pre-commit-hooks From 50e025bcd5956afeb9b17e91b0072e88c1fe4127 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 13 Apr 2023 11:13:28 +0200 Subject: [PATCH 064/232] Update pyproject.toml --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 52205b90..012ed757 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,9 @@ exclude = ''' )/ ''' +[tool.isort] +profile = "black" + [tool.ruff] ignore = [] line-length = 88 From 42bf0f8039da4de72d9d8d42a370885ac475e50a Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 14:45:36 +0200 Subject: [PATCH 065/232] Fix `date_hierarchy` with multiple fields (`ForeignKey`). #244 --- .../templatetags/admin_interface_tags.py | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index 73d41fed..83d2292a 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -4,12 +4,13 @@ from django import template from django.conf import settings +from django.contrib.admin.utils import get_fields_from_path from django.urls import NoReverseMatch, reverse from django.utils import translation from admin_interface.cache import get_cached_active_theme, set_cached_active_theme -from admin_interface.metadata import __version__ from admin_interface.models import Theme +from admin_interface.version import __version__ register = template.Library() @@ -95,17 +96,17 @@ def get_admin_interface_nocache(): @register.simple_tag(takes_context=False) def get_admin_interface_active_date_hierarchy(changelist): - date_field = changelist.date_hierarchy - if not date_field: + date_field_name = changelist.date_hierarchy + if not date_field_name: return params = changelist.get_filters_params() - # link to clear all filters contains 'date_field__gte', + # link to clear all filters contains f'{date_field_name}__gte', # only filters with specific year are really active - if f"{date_field}__year" not in params: + if f"{date_field_name}__year" not in params: return - return date_field + return date_field_name @register.inclusion_tag("admin_interface/list_filter_removal_link.html") @@ -131,21 +132,24 @@ def admin_interface_filter_removal_link(changelist, list_filter): @register.inclusion_tag("admin_interface/date_hierarchy_removal_link.html") -def admin_interface_date_hierarchy_removal_link(changelist, date_field): - date_label = changelist.model._meta.get_field(date_field).verbose_name +def admin_interface_date_hierarchy_removal_link(changelist, date_field_name): + date_field_path = get_fields_from_path(changelist.model, date_field_name) + # date_field = date_field_path[-1] + date_labels = [str(field.verbose_name) for field in date_field_path] + date_label = " ".join(date_labels).capitalize() params = changelist.get_filters_params() - date_params = [p for p in params if p.startswith(date_field)] + date_params = [p for p in params if p.startswith(date_field_name)] - date_args = [int(params[f"{date_field}__year"]), 1, 1] + date_args = [int(params[f"{date_field_name}__year"]), 1, 1] date_format = "Y" - if f"{date_field}__month" in params: - date_args[1] = int(params[f"{date_field}__month"]) + if f"{date_field_name}__month" in params: + date_args[1] = int(params[f"{date_field_name}__month"]) date_format = "YEAR_MONTH_FORMAT" - if f"{date_field}__day" in params: - date_args[2] = int(params[f"{date_field}__day"]) + if f"{date_field_name}__day" in params: + date_args[2] = int(params[f"{date_field_name}__day"]) date_format = "DATE_FORMAT" date_value = datetime.date(*date_args) From 55f2c86a47bf8c7680bc4fcb5f04b05474022f8b Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 15:52:25 +0200 Subject: [PATCH 066/232] Fix tabs not working with non-ASCII alphanumeric characters. #237 --- admin_interface/templates/admin/change_form.html | 12 ++++++------ admin_interface/templatetags/admin_interface_tags.py | 6 ++++++ pyproject.toml | 1 + requirements.txt | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/admin_interface/templates/admin/change_form.html b/admin_interface/templates/admin/change_form.html index c8b34dc0..5385857b 100644 --- a/admin_interface/templates/admin/change_form.html +++ b/admin_interface/templates/admin/change_form.html @@ -18,14 +18,14 @@ {% if show_fieldsets_as_tabs %} {% for fieldset in adminform %} {% with fieldset.name|default_if_none:opts.verbose_name as tab_name %} - {% endwith %} {% endfor %} {% else %} {% with opts.verbose_name as tab_name %} - {% endwith %} @@ -34,7 +34,7 @@ {% if show_inlines_as_tabs %} {% for inline_admin_formset in inline_admin_formsets %} {% with inline_admin_formset.opts.verbose_name_plural as tab_name %} - {% endwith %} @@ -48,14 +48,14 @@ {% if show_fieldsets_as_tabs %} {% for fieldset in adminform %} {% with fieldset.name|default_if_none:opts.verbose_name as tab_name %} -
+
{% include "admin/includes/headerless_fieldset.html" %}
{% endwith %} {% endfor %} {% else %} {% with opts.verbose_name as tab_name %} -
+
{% for fieldset in adminform %} {% include "admin/includes/fieldset.html" %} {% endfor %} @@ -65,7 +65,7 @@ {% for inline_admin_formset in inline_admin_formsets %} {% with inline_admin_formset.opts.verbose_name_plural as tab_name %} -
+
{% get_admin_interface_inline_template inline_admin_formset.opts.template as inline_template %} {% include inline_template %}
diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index 83d2292a..08b6b8df 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -7,6 +7,7 @@ from django.contrib.admin.utils import get_fields_from_path from django.urls import NoReverseMatch, reverse from django.utils import translation +from slugify import slugify from admin_interface.cache import get_cached_active_theme, set_cached_active_theme from admin_interface.models import Theme @@ -172,3 +173,8 @@ def admin_interface_use_changeform_tabs(adminform, inline_forms): has_inline_tabs = theme.show_inlines_as_tabs and len(inline_forms) > 0 has_tabs = has_fieldset_tabs or has_inline_tabs return has_tabs + + +@register.filter +def admin_interface_slugify(name): + return slugify(str(name or "")) diff --git a/pyproject.toml b/pyproject.toml index 012ed757..e8b932ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ classifiers = [ ] dependencies = [ "django-colorfield >= 0.8.0, < 1.0.0", + "python-slugify >= 7.0.0, < 9.0.0", ] dynamic = ["version"] maintainers = [ diff --git a/requirements.txt b/requirements.txt index 08ea0efb..fb7bf112 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ django >= 2.2 django-colorfield == 0.8.0 +python-slugify == 8.0.1 From 6f7a51bee8ae0162ab0f215df96579f8c9bf88b8 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 16:10:02 +0200 Subject: [PATCH 067/232] Add `css_generic_link_active_color` field to use on active tab (tabbed changeform). #232 --- README.md | 1 + admin_interface/admin.py | 1 + ...029_theme_css_generic_link_active_color.py | 24 +++++++++++++++++++ admin_interface/models.py | 7 ++++++ .../admin_interface/css/tabbed-changeform.css | 2 +- .../templates/admin/base_site.html | 1 + 6 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 admin_interface/migrations/0029_theme_css_generic_link_active_color.py diff --git a/README.md b/README.md index 9120456b..ca70c0d1 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ You can add **theme support to existing third-party libraries** using the follow - `--admin-interface-module-link-hover-color` - `--admin-interface-generic-link-color` - `--admin-interface-generic-link-hover-color` +- `--admin-interface-generic-link-active-color` #### Buttons - `--admin-interface-save-button-background-color` diff --git a/admin_interface/admin.py b/admin_interface/admin.py index bada3701..42ac7eb0 100644 --- a/admin_interface/admin.py +++ b/admin_interface/admin.py @@ -107,6 +107,7 @@ class ThemeAdmin(admin.ModelAdmin): "fields": ( "css_generic_link_color", "css_generic_link_hover_color", + "css_generic_link_active_color", ), }, ), diff --git a/admin_interface/migrations/0029_theme_css_generic_link_active_color.py b/admin_interface/migrations/0029_theme_css_generic_link_active_color.py new file mode 100644 index 00000000..cb487285 --- /dev/null +++ b/admin_interface/migrations/0029_theme_css_generic_link_active_color.py @@ -0,0 +1,24 @@ +import colorfield.fields +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("admin_interface", "0028_theme_show_fieldsets_as_tabs_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="theme", + name="css_generic_link_active_color", + field=colorfield.fields.ColorField( + blank=True, + default="#29B864", + help_text="#29B864", + image_field=None, + max_length=10, + samples=None, + verbose_name="link active color", + ), + ), + ] diff --git a/admin_interface/models.py b/admin_interface/models.py index 646396bc..a72df076 100644 --- a/admin_interface/models.py +++ b/admin_interface/models.py @@ -246,6 +246,13 @@ class Theme(models.Model): max_length=10, verbose_name=_("link hover color"), ) + css_generic_link_active_color = ColorField( + blank=True, + default="#29B864", + help_text="#29B864", + max_length=10, + verbose_name=_("link active color"), + ) css_save_button_background_color = ColorField( blank=True, diff --git a/admin_interface/static/admin_interface/css/tabbed-changeform.css b/admin_interface/static/admin_interface/css/tabbed-changeform.css index 298a970b..a0f6718f 100644 --- a/admin_interface/static/admin_interface/css/tabbed-changeform.css +++ b/admin_interface/static/admin_interface/css/tabbed-changeform.css @@ -49,7 +49,7 @@ .admin-interface .tabbed-changeform-tabs .tabbed-changeform-tablink.active { border: 1px solid var(--border-color); border-bottom: 1px solid transparent; - color: var(--admin-interface-module-background-color); + color: var(--admin-interface-generic-link-active-color); } .admin-interface .tabbed-changeform-tabs-remaining-space { diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index b6595ca4..f39ae75f 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -28,6 +28,7 @@ --admin-interface-module-link-hover-color: {{ theme.css_module_link_hover_color }}; --admin-interface-generic-link-color: {{ theme.css_generic_link_color }}; --admin-interface-generic-link-hover-color: {{ theme.css_generic_link_hover_color }}; + --admin-interface-generic-link-active-color: {{ theme.css_generic_link_active_color }}; --admin-interface-save-button-background-color: {{ theme.css_save_button_background_color }}; --admin-interface-save-button-background-hover-color: {{ theme.css_save_button_background_hover_color }}; --admin-interface-save-button-text-color: {{ theme.css_save_button_text_color }}; From 11905e80b7f21db2842afcf519586b9d3157af3d Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 16:18:56 +0200 Subject: [PATCH 068/232] Fix `ImportError`. --- admin_interface/templatetags/admin_interface_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index 08b6b8df..537afd1a 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -10,8 +10,8 @@ from slugify import slugify from admin_interface.cache import get_cached_active_theme, set_cached_active_theme +from admin_interface.metadata import __version__ from admin_interface.models import Theme -from admin_interface.version import __version__ register = template.Library() From b56b0b9c585c86192fc1f591468e14bbff67a559 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 16:20:42 +0200 Subject: [PATCH 069/232] Reformat migrations. --- admin_interface/migrations/0001_initial.py | 155 +++++++++++------- .../migrations/0002_add_related_modal.py | 43 +++-- .../0005_add_recent_actions_visible.py | 5 +- .../migrations/0006_bytes_to_str.py | 39 ++++- ...e_related_modal_background_opacity_type.py | 3 +- .../migrations/0009_add_enviroment.py | 5 +- .../migrations/0010_add_localization.py | 14 +- .../0011_add_environment_options.py | 12 +- .../0013_add_related_modal_close_button.py | 3 +- .../migrations/0014_name_unique.py | 5 +- .../0015_add_language_chooser_active.py | 5 +- .../0016_add_language_chooser_display.py | 5 +- .../0017_change_list_filter_dropdown.py | 5 +- .../0018_theme_list_filter_sticky.py | 5 +- .../migrations/0019_add_form_sticky.py | 10 +- .../0022_add_logo_max_width_and_height.py | 8 +- .../migrations/0023_theme_foldable_apps.py | 5 +- .../0026_theme_list_filter_highlight.py | 7 +- .../0027_theme_list_filter_removal_links.py | 2 - ...8_theme_show_fieldsets_as_tabs_and_more.py | 12 +- 20 files changed, 234 insertions(+), 114 deletions(-) diff --git a/admin_interface/migrations/0001_initial.py b/admin_interface/migrations/0001_initial.py index 9c545611..7ab0a901 100644 --- a/admin_interface/migrations/0001_initial.py +++ b/admin_interface/migrations/0001_initial.py @@ -18,202 +18,237 @@ class Migration(migrations.Migration): primary_key=True, ), ), - ("name", models.CharField(default=b"Django", max_length=50)), - ("active", models.BooleanField(default=True)), + ( + "name", + models.CharField( + default="Django", + max_length=50, + ), + ), + ( + "active", + models.BooleanField( + default=True, + ), + ), ( "title", models.CharField( - default=b"Django administration", max_length=50, blank=True + default="Django administration", + max_length=50, + blank=True, ), ), ( "title_visible", - models.BooleanField(default=True, verbose_name=b"visible"), + models.BooleanField( + default=True, + verbose_name="visible", + ), ), ( "logo", - models.FileField(upload_to=b"admin-interface/logo/", blank=True), + models.FileField( + upload_to="admin-interface/logo/", + blank=True, + ), ), ( "logo_visible", - models.BooleanField(default=True, verbose_name=b"visible"), + models.BooleanField( + default=True, + verbose_name="visible", + ), ), ( "css_header_background_color", colorfield.fields.ColorField( - default=b"#0C4B33", - help_text=b"#0C4B33", + default="#0C4B33", + help_text="#0C4B33", max_length=10, - verbose_name=b"background color", + verbose_name="background color", blank=True, ), ), ( "css_header_title_color", colorfield.fields.ColorField( - default=b"#F5DD5D", - help_text=b"#F5DD5D", + default="#F5DD5D", + help_text="#F5DD5D", max_length=10, - verbose_name=b"title color", + verbose_name="title color", blank=True, ), ), ( "css_header_text_color", colorfield.fields.ColorField( - default=b"#44B78B", - help_text=b"#44B78B", + default="#44B78B", + help_text="#44B78B", max_length=10, - verbose_name=b"text color", + verbose_name="text color", blank=True, ), ), ( "css_header_link_color", colorfield.fields.ColorField( - default=b"#FFFFFF", - help_text=b"#FFFFFF", + default="#FFFFFF", + help_text="#FFFFFF", max_length=10, - verbose_name=b"link color", + verbose_name="link color", blank=True, ), ), ( "css_header_link_hover_color", colorfield.fields.ColorField( - default=b"#C9F0DD", - help_text=b"#C9F0DD", + default="#C9F0DD", + help_text="#C9F0DD", max_length=10, - verbose_name=b"link hover color", + verbose_name="link hover color", blank=True, ), ), ( "css_module_background_color", colorfield.fields.ColorField( - default=b"#44B78B", - help_text=b"#44B78B", + default="#44B78B", + help_text="#44B78B", max_length=10, - verbose_name=b"background color", + verbose_name="background color", blank=True, ), ), ( "css_module_text_color", colorfield.fields.ColorField( - default=b"#FFFFFF", - help_text=b"#FFFFFF", + default="#FFFFFF", + help_text="#FFFFFF", max_length=10, - verbose_name=b"text color", + verbose_name="text color", blank=True, ), ), ( "css_module_link_color", colorfield.fields.ColorField( - default=b"#FFFFFF", - help_text=b"#FFFFFF", + default="#FFFFFF", + help_text="#FFFFFF", max_length=10, - verbose_name=b"link color", + verbose_name="link color", blank=True, ), ), ( "css_module_link_hover_color", colorfield.fields.ColorField( - default=b"#C9F0DD", - help_text=b"#C9F0DD", + default="#C9F0DD", + help_text="#C9F0DD", max_length=10, - verbose_name=b"link hover color", + verbose_name="link hover color", blank=True, ), ), ( "css_module_rounded_corners", - models.BooleanField(default=True, verbose_name=b"rounded corners"), + models.BooleanField( + default=True, + verbose_name="rounded corners", + ), ), ( "css_generic_link_color", colorfield.fields.ColorField( - default=b"#0C3C26", - help_text=b"#0C3C26", + default="#0C3C26", + help_text="#0C3C26", max_length=10, - verbose_name=b"link color", + verbose_name="link color", blank=True, ), ), ( "css_generic_link_hover_color", colorfield.fields.ColorField( - default=b"#156641", - help_text=b"#156641", + default="#156641", + help_text="#156641", max_length=10, - verbose_name=b"link hover color", + verbose_name="link hover color", blank=True, ), ), ( "css_save_button_background_color", colorfield.fields.ColorField( - default=b"#0C4B33", - help_text=b"#0C4B33", + default="#0C4B33", + help_text="#0C4B33", max_length=10, - verbose_name=b"background color", + verbose_name="background color", blank=True, ), ), ( "css_save_button_background_hover_color", colorfield.fields.ColorField( - default=b"#0C3C26", - help_text=b"#0C3C26", + default="#0C3C26", + help_text="#0C3C26", max_length=10, - verbose_name=b"background hover color", + verbose_name="background hover color", blank=True, ), ), ( "css_save_button_text_color", colorfield.fields.ColorField( - default=b"#FFFFFF", - help_text=b"#FFFFFF", + default="#FFFFFF", + help_text="#FFFFFF", max_length=10, - verbose_name=b"text color", + verbose_name="text color", blank=True, ), ), ( "css_delete_button_background_color", colorfield.fields.ColorField( - default=b"#BA2121", - help_text=b"#BA2121", + default="#BA2121", + help_text="#BA2121", max_length=10, - verbose_name=b"background color", + verbose_name="background color", blank=True, ), ), ( "css_delete_button_background_hover_color", colorfield.fields.ColorField( - default=b"#A41515", - help_text=b"#A41515", + default="#A41515", + help_text="#A41515", max_length=10, - verbose_name=b"background hover color", + verbose_name="background hover color", blank=True, ), ), ( "css_delete_button_text_color", colorfield.fields.ColorField( - default=b"#FFFFFF", - help_text=b"#FFFFFF", + default="#FFFFFF", + help_text="#FFFFFF", max_length=10, - verbose_name=b"text color", + verbose_name="text color", + blank=True, + ), + ), + ( + "css", + models.TextField( blank=True, ), ), - ("css", models.TextField(blank=True)), - ("list_filter_dropdown", models.BooleanField(default=False)), + ( + "list_filter_dropdown", + models.BooleanField( + default=False, + ), + ), ], options={ "verbose_name": "Theme", diff --git a/admin_interface/migrations/0002_add_related_modal.py b/admin_interface/migrations/0002_add_related_modal.py index e6411142..05401771 100644 --- a/admin_interface/migrations/0002_add_related_modal.py +++ b/admin_interface/migrations/0002_add_related_modal.py @@ -11,22 +11,28 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="list_filter_dropdown", - field=models.BooleanField(default=False, verbose_name=b"use dropdown"), + field=models.BooleanField( + default=False, + verbose_name="use dropdown", + ), ), migrations.AddField( model_name="theme", name="related_modal_active", - field=models.BooleanField(default=True, verbose_name=b"active"), + field=models.BooleanField( + default=True, + verbose_name="active", + ), ), migrations.AddField( model_name="theme", name="related_modal_background_color", field=colorfield.fields.ColorField( blank=True, - default=b"#000000", - help_text=b"#000000", + default="#000000", + help_text="#000000", max_length=10, - verbose_name=b"background color", + verbose_name="background color", ), ), migrations.AddField( @@ -34,24 +40,27 @@ class Migration(migrations.Migration): name="related_modal_background_opacity", field=models.FloatField( choices=[ - (0.1, b"10%"), - (0.2, b"20%"), - (0.3, b"30%"), - (0.4, b"40%"), - (0.5, b"50%"), - (0.6, b"60%"), - (0.7, b"70%"), - (0.8, b"80%"), - (0.9, b"90%"), + (0.1, "10%"), + (0.2, "20%"), + (0.3, "30%"), + (0.4, "40%"), + (0.5, "50%"), + (0.6, "60%"), + (0.7, "70%"), + (0.8, "80%"), + (0.9, "90%"), ], default=0.2, - help_text=b"20%", - verbose_name=b"background opacity", + help_text="20%", + verbose_name="background opacity", ), ), migrations.AddField( model_name="theme", name="related_modal_rounded_corners", - field=models.BooleanField(default=True, verbose_name=b"rounded corners"), + field=models.BooleanField( + default=True, + verbose_name="rounded corners", + ), ), ] diff --git a/admin_interface/migrations/0005_add_recent_actions_visible.py b/admin_interface/migrations/0005_add_recent_actions_visible.py index 8f844e23..432001db 100644 --- a/admin_interface/migrations/0005_add_recent_actions_visible.py +++ b/admin_interface/migrations/0005_add_recent_actions_visible.py @@ -10,6 +10,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="recent_actions_visible", - field=models.BooleanField(default=True, verbose_name="visible"), + field=models.BooleanField( + default=True, + verbose_name="visible", + ), ), ] diff --git a/admin_interface/migrations/0006_bytes_to_str.py b/admin_interface/migrations/0006_bytes_to_str.py index 30698f6f..52cdb898 100644 --- a/admin_interface/migrations/0006_bytes_to_str.py +++ b/admin_interface/migrations/0006_bytes_to_str.py @@ -143,7 +143,10 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="css_module_rounded_corners", - field=models.BooleanField(default=True, verbose_name="rounded corners"), + field=models.BooleanField( + default=True, + verbose_name="rounded corners", + ), ), migrations.AlterField( model_name="theme", @@ -192,22 +195,34 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="list_filter_dropdown", - field=models.BooleanField(default=False, verbose_name="use dropdown"), + field=models.BooleanField( + default=False, + verbose_name="use dropdown", + ), ), migrations.AlterField( model_name="theme", name="logo_visible", - field=models.BooleanField(default=True, verbose_name="visible"), + field=models.BooleanField( + default=True, + verbose_name="visible", + ), ), migrations.AlterField( model_name="theme", name="name", - field=models.CharField(default="Django", max_length=50), + field=models.CharField( + default="Django", + max_length=50, + ), ), migrations.AlterField( model_name="theme", name="related_modal_active", - field=models.BooleanField(default=True, verbose_name="active"), + field=models.BooleanField( + default=True, + verbose_name="active", + ), ), migrations.AlterField( model_name="theme", @@ -243,13 +258,18 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="related_modal_rounded_corners", - field=models.BooleanField(default=True, verbose_name="rounded corners"), + field=models.BooleanField( + default=True, + verbose_name="rounded corners", + ), ), migrations.AlterField( model_name="theme", name="title", field=models.CharField( - blank=True, default="Django administration", max_length=50 + blank=True, + default="Django administration", + max_length=50, ), ), migrations.AlterField( @@ -266,6 +286,9 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="title_visible", - field=models.BooleanField(default=True, verbose_name="visible"), + field=models.BooleanField( + default=True, + verbose_name="visible", + ), ), ] diff --git a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py index 8055993f..b4bda243 100644 --- a/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py +++ b/admin_interface/migrations/0008_change_related_modal_background_opacity_type.py @@ -8,7 +8,8 @@ class Migration(migrations.Migration): operations = [ migrations.RemoveField( - model_name="theme", name="related_modal_background_opacity" + model_name="theme", + name="related_modal_background_opacity", ), migrations.AddField( model_name="theme", diff --git a/admin_interface/migrations/0009_add_enviroment.py b/admin_interface/migrations/0009_add_enviroment.py index 791375fd..9c19b2cf 100644 --- a/admin_interface/migrations/0009_add_enviroment.py +++ b/admin_interface/migrations/0009_add_enviroment.py @@ -25,6 +25,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="env_visible", - field=models.BooleanField(default=True, verbose_name="visible"), + field=models.BooleanField( + default=True, + verbose_name="visible", + ), ), ] diff --git a/admin_interface/migrations/0010_add_localization.py b/admin_interface/migrations/0010_add_localization.py index 700ee7d8..08e504f1 100644 --- a/admin_interface/migrations/0010_add_localization.py +++ b/admin_interface/migrations/0010_add_localization.py @@ -10,12 +10,18 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="active", - field=models.BooleanField(default=True, verbose_name="active"), + field=models.BooleanField( + default=True, + verbose_name="active", + ), ), migrations.AlterField( model_name="theme", name="css", - field=models.TextField(blank=True, verbose_name="text color"), + field=models.TextField( + blank=True, + verbose_name="text color", + ), ), migrations.AlterField( model_name="theme", @@ -46,7 +52,9 @@ class Migration(migrations.Migration): model_name="theme", name="name", field=models.CharField( - default="Django", max_length=50, verbose_name="name" + default="Django", + max_length=50, + verbose_name="name", ), ), migrations.AlterField( diff --git a/admin_interface/migrations/0011_add_environment_options.py b/admin_interface/migrations/0011_add_environment_options.py index a2ce25e4..1876cdbf 100644 --- a/admin_interface/migrations/0011_add_environment_options.py +++ b/admin_interface/migrations/0011_add_environment_options.py @@ -16,7 +16,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="env_name", - field=models.CharField(blank=True, max_length=50, verbose_name="name"), + field=models.CharField( + blank=True, + max_length=50, + verbose_name="name", + ), ), migrations.AddField( model_name="theme", @@ -41,14 +45,16 @@ class Migration(migrations.Migration): model_name="theme", name="env_visible_in_header", field=models.BooleanField( - default=True, verbose_name="visible in header (marker and name)" + default=True, + verbose_name="visible in header (marker and name)", ), ), migrations.AddField( model_name="theme", name="env_visible_in_favicon", field=models.BooleanField( - default=True, verbose_name="visible in favicon (marker)" + default=True, + verbose_name="visible in favicon (marker)", ), ), ] diff --git a/admin_interface/migrations/0013_add_related_modal_close_button.py b/admin_interface/migrations/0013_add_related_modal_close_button.py index df64e004..f67063eb 100644 --- a/admin_interface/migrations/0013_add_related_modal_close_button.py +++ b/admin_interface/migrations/0013_add_related_modal_close_button.py @@ -11,7 +11,8 @@ class Migration(migrations.Migration): model_name="theme", name="related_modal_close_button_visible", field=models.BooleanField( - default=True, verbose_name="close button visible" + default=True, + verbose_name="close button visible", ), ), ] diff --git a/admin_interface/migrations/0014_name_unique.py b/admin_interface/migrations/0014_name_unique.py index c4abeaed..7404a451 100644 --- a/admin_interface/migrations/0014_name_unique.py +++ b/admin_interface/migrations/0014_name_unique.py @@ -11,7 +11,10 @@ class Migration(migrations.Migration): model_name="theme", name="name", field=models.CharField( - default="Django", max_length=50, unique=True, verbose_name="name" + default="Django", + max_length=50, + unique=True, + verbose_name="name", ), ), ] diff --git a/admin_interface/migrations/0015_add_language_chooser_active.py b/admin_interface/migrations/0015_add_language_chooser_active.py index 2b44e31a..a679a582 100644 --- a/admin_interface/migrations/0015_add_language_chooser_active.py +++ b/admin_interface/migrations/0015_add_language_chooser_active.py @@ -10,6 +10,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="language_chooser_active", - field=models.BooleanField(default=True, verbose_name="active"), + field=models.BooleanField( + default=True, + verbose_name="active", + ), ), ] diff --git a/admin_interface/migrations/0016_add_language_chooser_display.py b/admin_interface/migrations/0016_add_language_chooser_display.py index 88ceddd1..8b56f59d 100644 --- a/admin_interface/migrations/0016_add_language_chooser_display.py +++ b/admin_interface/migrations/0016_add_language_chooser_display.py @@ -11,7 +11,10 @@ class Migration(migrations.Migration): model_name="theme", name="language_chooser_display", field=models.CharField( - choices=[("code", "code"), ("name", "name")], + choices=[ + ("code", "code"), + ("name", "name"), + ], default="code", max_length=10, verbose_name="display", diff --git a/admin_interface/migrations/0017_change_list_filter_dropdown.py b/admin_interface/migrations/0017_change_list_filter_dropdown.py index 010224ff..90a071ad 100644 --- a/admin_interface/migrations/0017_change_list_filter_dropdown.py +++ b/admin_interface/migrations/0017_change_list_filter_dropdown.py @@ -10,6 +10,9 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="theme", name="list_filter_dropdown", - field=models.BooleanField(default=True, verbose_name="use dropdown"), + field=models.BooleanField( + default=True, + verbose_name="use dropdown", + ), ), ] diff --git a/admin_interface/migrations/0018_theme_list_filter_sticky.py b/admin_interface/migrations/0018_theme_list_filter_sticky.py index c72d8fc6..38b819a1 100644 --- a/admin_interface/migrations/0018_theme_list_filter_sticky.py +++ b/admin_interface/migrations/0018_theme_list_filter_sticky.py @@ -10,6 +10,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="list_filter_sticky", - field=models.BooleanField(default=True, verbose_name="sticky position"), + field=models.BooleanField( + default=True, + verbose_name="sticky position", + ), ), ] diff --git a/admin_interface/migrations/0019_add_form_sticky.py b/admin_interface/migrations/0019_add_form_sticky.py index 871a5fb9..978ac676 100644 --- a/admin_interface/migrations/0019_add_form_sticky.py +++ b/admin_interface/migrations/0019_add_form_sticky.py @@ -10,11 +10,17 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="form_pagination_sticky", - field=models.BooleanField(default=False, verbose_name="sticky pagination"), + field=models.BooleanField( + default=False, + verbose_name="sticky pagination", + ), ), migrations.AddField( model_name="theme", name="form_submit_sticky", - field=models.BooleanField(default=False, verbose_name="sticky submit"), + field=models.BooleanField( + default=False, + verbose_name="sticky submit", + ), ), ] diff --git a/admin_interface/migrations/0022_add_logo_max_width_and_height.py b/admin_interface/migrations/0022_add_logo_max_width_and_height.py index 708329b2..10960ba3 100644 --- a/admin_interface/migrations/0022_add_logo_max_width_and_height.py +++ b/admin_interface/migrations/0022_add_logo_max_width_and_height.py @@ -11,14 +11,18 @@ class Migration(migrations.Migration): model_name="theme", name="logo_max_height", field=models.PositiveSmallIntegerField( - blank=True, default=100, verbose_name="max height" + blank=True, + default=100, + verbose_name="max height", ), ), migrations.AddField( model_name="theme", name="logo_max_width", field=models.PositiveSmallIntegerField( - blank=True, default=400, verbose_name="max width" + blank=True, + default=400, + verbose_name="max width", ), ), ] diff --git a/admin_interface/migrations/0023_theme_foldable_apps.py b/admin_interface/migrations/0023_theme_foldable_apps.py index c96fdcc0..2b4c60b8 100644 --- a/admin_interface/migrations/0023_theme_foldable_apps.py +++ b/admin_interface/migrations/0023_theme_foldable_apps.py @@ -10,6 +10,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="foldable_apps", - field=models.BooleanField(default=True, verbose_name="foldable apps"), + field=models.BooleanField( + default=True, + verbose_name="foldable apps", + ), ), ] diff --git a/admin_interface/migrations/0026_theme_list_filter_highlight.py b/admin_interface/migrations/0026_theme_list_filter_highlight.py index 271d7480..4010e228 100644 --- a/admin_interface/migrations/0026_theme_list_filter_highlight.py +++ b/admin_interface/migrations/0026_theme_list_filter_highlight.py @@ -1,5 +1,3 @@ -# Generated by Django 4.0.7 on 2022-09-28 17:38 - from django.db import migrations, models @@ -12,6 +10,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="list_filter_highlight", - field=models.BooleanField(default=True, verbose_name="highlight active"), + field=models.BooleanField( + default=True, + verbose_name="highlight active", + ), ), ] diff --git a/admin_interface/migrations/0027_theme_list_filter_removal_links.py b/admin_interface/migrations/0027_theme_list_filter_removal_links.py index 7d97fe7f..7366eaba 100644 --- a/admin_interface/migrations/0027_theme_list_filter_removal_links.py +++ b/admin_interface/migrations/0027_theme_list_filter_removal_links.py @@ -1,5 +1,3 @@ -# Generated by Django 4.0.7 on 2022-10-10 21:46 - from django.db import migrations, models diff --git a/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py b/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py index 18999f19..d331d81b 100644 --- a/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py +++ b/admin_interface/migrations/0028_theme_show_fieldsets_as_tabs_and_more.py @@ -1,5 +1,3 @@ -# Generated by Django 4.1.3 on 2022-11-23 11:01 - from django.db import migrations, models @@ -12,11 +10,17 @@ class Migration(migrations.Migration): migrations.AddField( model_name="theme", name="show_fieldsets_as_tabs", - field=models.BooleanField(default=False, verbose_name="fieldsets as tabs"), + field=models.BooleanField( + default=False, + verbose_name="fieldsets as tabs", + ), ), migrations.AddField( model_name="theme", name="show_inlines_as_tabs", - field=models.BooleanField(default=False, verbose_name="inlines as tabs"), + field=models.BooleanField( + default=False, + verbose_name="inlines as tabs", + ), ), ] From 544b2e68c03fa7e028a773963565be36be026785 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 16:21:19 +0200 Subject: [PATCH 070/232] Force date hierarchy label to be lower case. --- admin_interface/templatetags/admin_interface_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index 537afd1a..1eceb36a 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -137,7 +137,7 @@ def admin_interface_date_hierarchy_removal_link(changelist, date_field_name): date_field_path = get_fields_from_path(changelist.model, date_field_name) # date_field = date_field_path[-1] date_labels = [str(field.verbose_name) for field in date_field_path] - date_label = " ".join(date_labels).capitalize() + date_label = " ".join(date_labels).lower() params = changelist.get_filters_params() date_params = [p for p in params if p.startswith(date_field_name)] From 31ee37a151240b57d6d0112641cb92a8d7260207 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 18:04:02 +0200 Subject: [PATCH 071/232] Update `CHANGELOG` and version. --- CHANGELOG.md | 301 +++++++++++++++++++----------------- admin_interface/metadata.py | 2 +- 2 files changed, 162 insertions(+), 141 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a1b29ad..c7f2c651 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,239 +4,260 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.25.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.25.0) - 2023-04-18 +- Add `Django 4.2` support. +- Drop `Django 2.2` support. +- Fix `date_hierarchy` with multiple fields (`ForeignKey`). #244 +- Fix tabs not working with non-ASCII alphanumeric characters. #237 +- Fix multidb tests. +- Add `css_generic_link_active_color` field to use on active tab (tabbed changeform). #232 +- Replace `flake8` with `Ruff`. +- Switch from `setup.py` to `pyproject.toml`. +- Add `pyupgrade` to `pre-commit` config. +- Add `django-upgrade` to `pre-commit` hooks. +- Upgrade syntax for `Python >= 3.8`. +- Run `pre-commit` also with `tox`. +- Reformat migrations. +- Bump requirements. +- Bump `pre-commit` hooks. +- Pin test requirements. +- Add pull request template. +- Add `CODE_OF_CONDUCT.md`. #238 +- Rename default branch from `master` to `main`. + ## [0.24.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.24.2) - 2022-12-19 -- Fix modal and popup opening at the same time. #228 -- Make `Theme.get_active_theme` class method a manager method. (by [@MounirMesselmeni](https://github.com/MounirMesselmeni) in #230) +- Fix modal and popup opening at the same time. #228 +- Make `Theme.get_active_theme` class method a manager method. (by [@MounirMesselmeni](https://github.com/MounirMesselmeni) in #230) ## [0.24.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.24.1) - 2022-12-14 -- Fix modal opener buttons not working when added to the DOM asynchronously. #228 -- [css] Improve changelist filter margins. +- Fix modal opener buttons not working when added to the DOM asynchronously. #228 +- [css] Improve changelist filter margins. ## [0.24.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.24.0) - 2022-12-11 -- Drop `Python < 3.8` and `Django < 2.2` versions support. (by [@merwok](https://github.com/merwok) in #220) -- Replace `str.format` with `f-strings`. -- Remove `post_migrate` signal handler and multi db test. -- Add german translation. (by [@derzinn](https://github.com/derzinn) in #222) -- Include date hierarchy in quick removal links (by [@merwok](https://github.com/merwok) in #218) -- Fix broken tabbed inline name. (by [@VaZark](https://github.com/VaZark) in #221) -- Minor cleanups. (by [@merwok](https://github.com/merwok) in #225) -- Bump actions and requirements. -- [css] Fix inlines vertical alignement. (by [@VaZark](https://github.com/VaZark) in #201) -- [css] Fix tabbed changeform tabs text color on focus. (by [@VaZark](https://github.com/VaZark) in #223) -- [CI] Add Farsi language to `tests.settings.LANGUAGES`. (by [@merwok](https://github.com/merwok)) -- [CI] Update `pre-commit` config. -- [CI] Automate package build and publish on PyPI. +- Drop `Python < 3.8` and `Django < 2.2` versions support. (by [@merwok](https://github.com/merwok) in #220) +- Replace `str.format` with `f-strings`. +- Remove `post_migrate` signal handler and multi db test. +- Add german translation. (by [@derzinn](https://github.com/derzinn) in #222) +- Include date hierarchy in quick removal links (by [@merwok](https://github.com/merwok) in #218) +- Fix broken tabbed inline name. (by [@VaZark](https://github.com/VaZark) in #221) +- Minor cleanups. (by [@merwok](https://github.com/merwok) in #225) +- Bump actions and requirements. +- [css] Fix inlines vertical alignement. (by [@VaZark](https://github.com/VaZark) in #201) +- [css] Fix tabbed changeform tabs text color on focus. (by [@VaZark](https://github.com/VaZark) in #223) +- [CI] Add Farsi language to `tests.settings.LANGUAGES`. (by [@merwok](https://github.com/merwok)) +- [CI] Update `pre-commit` config. +- [CI] Automate package build and publish on PyPI. ## [0.23.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.23.0) - 2022-11-30 -- Add `Python 3.11` support. -- Add tabbed changeform support. (by [@VaZark](https://github.com/VaZark) in #211) -- Fix #208 / Do not assume active DB when not specified. (by [@VaZark](https://github.com/VaZark) in #210) -- Update translations. -- Bump actions and requirements. -- [css] Adjust list filter dropdown vertical margins. -- [css] Improve nav filter style. #214 -- [css] Improve language chooser style. -- [css] Reduce secondary scrollbars size. -- [CI] Update `dependabot.yml` -- [CI] Add `pre-commit-autoupdate.yml` workflow. -- [CI] Update `pre-commit` hooks. +- Add `Python 3.11` support. +- Add tabbed changeform support. (by [@VaZark](https://github.com/VaZark) in #211) +- Fix #208 / Do not assume active DB when not specified. (by [@VaZark](https://github.com/VaZark) in #210) +- Update translations. +- Bump actions and requirements. +- [css] Adjust list filter dropdown vertical margins. +- [css] Improve nav filter style. #214 +- [css] Improve language chooser style. +- [css] Reduce secondary scrollbars size. +- [CI] Update `dependabot.yml` +- [CI] Add `pre-commit-autoupdate.yml` workflow. +- [CI] Update `pre-commit` hooks. ## [0.22.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.22.2) - 2022-11-18 -- [CI] Add `django 4.1` to tests. -- [CI] Add `pre-commit` with `black`, `isort` and `flake8`. -- Respect `using` in signals. #199 (by [@VaZark](https://github.com/VaZark) in #200) -- Remove translations line numbers to avoid `lint` step failures. +- [CI] Add `django 4.1` to tests. +- [CI] Add `pre-commit` with `black`, `isort` and `flake8`. +- Respect `using` in signals. #199 (by [@VaZark](https://github.com/VaZark) in #200) +- Remove translations line numbers to avoid `lint` step failures. ## [0.22.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.22.1) - 2022-10-13 -- Fix `KeyError` raised by `django-rangefilter`. -- [css] Add `django-rangefilter` style optimizations. -- [css] Fix list-filter dropdown vertical margins. -- [css] Fix calendar prev/next arrows style. +- Fix `KeyError` raised by `django-rangefilter`. +- [css] Add `django-rangefilter` style optimizations. +- [css] Fix list-filter dropdown vertical margins. +- [css] Fix calendar prev/next arrows style. ## [0.22.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.22.0) - 2022-10-12 -- Add CI checks for migrations and translations. #184 (by [@merwok](https://github.com/merwok) in #186) -- Add option for list filter quick remove. #181 (by [@merwok](https://github.com/merwok) in #183) -- [css] Fix left/right scrolling broken with django-import-export. #165 -- [html] Fix duplicated welcome message. #185 +- Add CI checks for migrations and translations. #184 (by [@merwok](https://github.com/merwok) in #186) +- Add option for list filter quick remove. #181 (by [@merwok](https://github.com/merwok) in #183) +- [css] Fix left/right scrolling broken with django-import-export. #165 +- [html] Fix duplicated welcome message. #185 ## [0.21.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.21.0) - 2022-10-06 -- Add language chooser control option (default select, minimal select). #136 -- Add option to make active list filters more visible. #174 (by [@merwok](https://github.com/merwok) in #178) -- Add support for collapsible fieldsets that start expanded. #173 (by [@merwok](https://github.com/merwok) in #177) -- [js] Fix modal window not closing on save with `django >= 4.0`. #169 -- [css] Move `language-chooser` style to its own CSS file. -- [css] Fix sticky list filter scrolling. #175 -- [css] Fix paginator missing `border-top` on mobile. +- Add language chooser control option (default select, minimal select). #136 +- Add option to make active list filters more visible. #174 (by [@merwok](https://github.com/merwok) in #178) +- Add support for collapsible fieldsets that start expanded. #173 (by [@merwok](https://github.com/merwok) in #177) +- [js] Fix modal window not closing on save with `django >= 4.0`. #169 +- [css] Move `language-chooser` style to its own CSS file. +- [css] Fix sticky list filter scrolling. #175 +- [css] Fix paginator missing `border-top` on mobile. ## [0.20.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.20.0) - 2022-08-25 -- Add `django-streamfield` compatibility. +- Add `django-streamfield` compatibility. ## [0.19.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.19.2) - 2022-08-04 -- Fix `hashlib` compatibility with `FIPS` enabled systems. #167 (by [@jonlev1n](https://github.com/jonlev1n) in #168) +- Fix `hashlib` compatibility with `FIPS` enabled systems. #167 (by [@jonlev1n](https://github.com/jonlev1n) in #168) ## [0.19.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.19.1) - 2022-05-14 -- [css] Fixed dashboard alignment when recent-actions are not visible. +- [css] Fixed dashboard alignment when recent-actions are not visible. ## [0.19.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.19.0) - 2022-03-08 -- Converted dynamic inline CSS to external static CSS using CSS variables. #157 #93 (thanks to [@Mustafa-Abu-Ghazy](https://github.com/Mustafa-Abu-Ghazy)) +- Converted dynamic inline CSS to external static CSS using CSS variables. #157 #93 (thanks to [@Mustafa-Abu-Ghazy](https://github.com/Mustafa-Abu-Ghazy)) ## [0.18.7](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.7) - 2022-02-24 -- Removed public disclosures of the lib's version. #154 (thanks to [@mintyPT](https://github.com/mintyPT)) -- Reformatted code with **Black**. +- Removed public disclosures of the lib's version. #154 (thanks to [@mintyPT](https://github.com/mintyPT)) +- Reformatted code with **Black**. ## [0.18.6](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.6) - 2022-02-04 -- Added polish (`pl`) localization by [paduszyk](https://github.com/paduszyk). #152 -- Fixed login logo `max-width` and title `color`. +- Added polish (`pl`) localization by [paduszyk](https://github.com/paduszyk). #152 +- Fixed login logo `max-width` and title `color`. ## [0.18.5](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.5) - 2022-01-21 -- Added portuguese brazil (`pt_BR`) localization by [leandromsd](https://github.com/leandromsd). #149 -- Fixed body scroll reset to top when opening related modal. #150 +- Added portuguese brazil (`pt_BR`) localization by [leandromsd](https://github.com/leandromsd). #149 +- Fixed body scroll reset to top when opening related modal. #150 ## [0.18.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.4) - 2022-01-05 -- Added official django 4.0 support. -- Added link to admin home page on logo and title. #147 -- Fixed collapsed inlines rounded bottom borders. -- Fixed missing comma in tests settings `MIDDLEWARE_CLASSES`. #145 +- Added official django 4.0 support. +- Added link to admin home page on logo and title. #147 +- Fixed collapsed inlines rounded bottom borders. +- Fixed missing comma in tests settings `MIDDLEWARE_CLASSES`. #145 ## [0.18.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.3) - 2021-12-07 -- Added official python 3.10 support. -- Replaced travis with GitHub action workflow. #142 -- Fixed `check_installed_apps` checks. -- Fixed django default appconfig deprecation warning. #141 +- Added official python 3.10 support. +- Replaced travis with GitHub action workflow. #142 +- Fixed `check_installed_apps` checks. +- Fixed django default appconfig deprecation warning. #141 ## [0.18.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.2) - 2021-10-25 -- Fixed migration error. +- Fixed migration error. ## [0.18.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.1) - 2021-10-25 -- Removed wrong migration. +- Removed wrong migration. ## [0.18.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.0) - 2021-10-24 -- Added foldable apps support. #117 -- Removed `css` field from `Theme` model. +- Added foldable apps support. #117 +- Removed `css` field from `Theme` model. ## [0.17.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.3) - 2021-10-12 -- Fixed `FileExtensionValidator` `TypeError` on django < 1.11. +- Fixed `FileExtensionValidator` `TypeError` on django < 1.11. ## [0.17.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.2) - 2021-10-08 -- Fixed `FileExtensionValidator` `TypeError` on django < 1.11. +- Fixed `FileExtensionValidator` `TypeError` on django < 1.11. ## [0.17.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.1) - 2021-09-24 -- Fixed `TemplateDoesNotExist` error on `django==4.0.a1` removing checking condition for `colorfield` package. #134 -- Fixed favicon fetching incompatible with `django-storages` `S3`. #128 +- Fixed `TemplateDoesNotExist` error on `django==4.0.a1` removing checking condition for `colorfield` package. #134 +- Fixed favicon fetching incompatible with `django-storages` `S3`. #128 ## [0.17.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.17.0) - 2021-09-16 -- Added `logo_max_width` and `logo_max_height`. #127 +- Added `logo_max_width` and `logo_max_height`. #127 ## [0.16.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.4) - 2021-09-04 -- Fixed `0020_module_selected_colors` migration for multiple dbs. #132 -- Fixed sticky pagination `width` and `border-bottom`. -- Fixed inlines vertical overlow. -- Improved header elements vertical alignment. +- Fixed `0020_module_selected_colors` migration for multiple dbs. #132 +- Fixed sticky pagination `width` and `border-bottom`. +- Fixed inlines vertical overlow. +- Improved header elements vertical alignment. ## [0.16.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.3) - 2021-04-26 -- Added `compat` module. -- Added missing `0021_file_extension_validator` migration. #126 -- Formatted migrations. +- Added `compat` module. +- Added missing `0021_file_extension_validator` migration. #126 +- Formatted migrations. ## [0.16.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.2) - 2021-04-23 -- Added `python 3.9` and `django 3.2` to CI. -- Added `FileExtensionValidator` to `logo` and `favicon` fields. #112 -- Fixed `models.W042` warning on `django 3.2`. -- Fixed header `min-height`. -- Fixed selects `min-width`. -- Fixed changelist search, actions and submit button horizontal margins. -- Fixed related widget wrapper margin/padding with normal select and in inlines. -- Fixed tabular inlines horizontal scroll. +- Added `python 3.9` and `django 3.2` to CI. +- Added `FileExtensionValidator` to `logo` and `favicon` fields. #112 +- Fixed `models.W042` warning on `django 3.2`. +- Fixed header `min-height`. +- Fixed selects `min-width`. +- Fixed changelist search, actions and submit button horizontal margins. +- Fixed related widget wrapper margin/padding with normal select and in inlines. +- Fixed tabular inlines horizontal scroll. ## [0.16.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.1) - 2021-04-07 -- Fixed style of "Delete" and "Save" buttons in the delete confirmation page. #123 -- Overridden dark-mode css variables introduced in `django 3.2`. #124 +- Fixed style of "Delete" and "Save" buttons in the delete confirmation page. #123 +- Overridden dark-mode css variables introduced in `django 3.2`. #124 ## [0.16.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.16.0) - 2021-03-30 -- Added customizable colors for selected apps and models in dashboard. #122 -- Added `responsive_rtl.css` stylesheet. #98 -- Updated `vazir-font` version to `27.2.2`. #98 +- Added customizable colors for selected apps and models in dashboard. #122 +- Added `responsive_rtl.css` stylesheet. #98 +- Updated `vazir-font` version to `27.2.2`. #98 ## [0.15.6](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.6) - 2021-03-26 -- Fixed `show_change_link` related modal support. #120 -- Fixed inline changelink style. -- Made globally available `presentRelatedObjectModal` and `presentRelatedObjectModalOnClickOn` js functions. +- Fixed `show_change_link` related modal support. #120 +- Fixed inline changelink style. +- Made globally available `presentRelatedObjectModal` and `presentRelatedObjectModalOnClickOn` js functions. ## [0.15.5](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.5) - 2021-03-02 -- Fixed sticky submit and pagination `z-index` issue with related modal. +- Fixed sticky submit and pagination `z-index` issue with related modal. ## [0.15.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.4) - 2021-03-01 -- Fixed sticky submit and pagination `z-index` issue with sticky `list_filter` and `django-json-widget`. +- Fixed sticky submit and pagination `z-index` issue with sticky `list_filter` and `django-json-widget`. ## [0.15.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.3) - 2021-02-08 -- Fixed sticky submit and pagination width when `admin.site.enable_nav_sidebar = False`. #113 +- Fixed sticky submit and pagination width when `admin.site.enable_nav_sidebar = False`. #113 ## [0.15.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.2) - 2021-02-03 -- Fixed body classes template rendering. -- Improved sticky submit and pagination backward compatibility. +- Fixed body classes template rendering. +- Improved sticky submit and pagination backward compatibility. ## [0.15.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.1) - 2021-02-03 -- Fixed and improved sticky form controls and pagination style. +- Fixed and improved sticky form controls and pagination style. ## [0.15.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.15.0) - 2021-02-03 -- Added sticky form controls and pagination options. #110 -- Added support to 4-digit language code in language chooser. #111 -- Added theme css variables for third-party libraries. -- Fixed app module section link hover color. +- Added sticky form controls and pagination options. #110 +- Added support to 4-digit language code in language chooser. #111 +- Added theme css variables for third-party libraries. +- Fixed app module section link hover color. ## [0.14.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.14.2) - 2021-01-04 -- Fixed tabular inline scroll bar. #101 -- Fixed module header selected link color. #102 -- Fixed main content width when `admin.site.enable_nav_sidebar = False`. #105 +- Fixed tabular inline scroll bar. #101 +- Fixed module header selected link color. #102 +- Fixed main content width when `admin.site.enable_nav_sidebar = False`. #105 ## [0.14.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.14.1) - 2020-11-12 -- Fixed sticky list-filter floating. #100 +- Fixed sticky list-filter floating. #100 ## [0.14.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.14.0) - 2020-10-15 -- Added list filter sticky option (only for `django >= 3.1.2`). -- Enabled list filter dropdown by default. -- Fixed changelist searchbar style. +- Added list filter sticky option (only for `django >= 3.1.2`). +- Enabled list filter dropdown by default. +- Fixed changelist searchbar style. ## [0.13.7](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.7) - 2020-10-14 -- Improved responsive widgets style. -- Prevented body horizontal scroll. -- Fixed tabular inline horizontal scroll. -- Fixed changelist filter min-width. -- Fixed changelist and toolbar theme rounded corners. -- Fixed calendar and timelist buttons theme color. -- Fixed list filter select size. -- Fixed content max-width with `django >= 3.1`. +- Improved responsive widgets style. +- Prevented body horizontal scroll. +- Fixed tabular inline horizontal scroll. +- Fixed changelist filter min-width. +- Fixed changelist and toolbar theme rounded corners. +- Fixed calendar and timelist buttons theme color. +- Fixed list filter select size. +- Fixed content max-width with `django >= 3.1`. ## [0.13.6](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.6) - 2020-10-14 -- Added persian language. #98 -- Fixed logo max-width on small screens. -- Fixed content max-width when nav-sidebar is collapsed. -- Fixed changelist max-width on medium screens. +- Added persian language. #98 +- Fixed logo max-width on small screens. +- Fixed content max-width when nav-sidebar is collapsed. +- Fixed changelist max-width on medium screens. ## [0.13.5](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.5) - 2020-09-15 -- Fixed loaddata error with initial_data.json fixture. #97 -- Fixed tests warning (admin.W411). -- Fixed changelist thead links color. -- Fixed changelist filter links hover color. +- Fixed loaddata error with initial_data.json fixture. #97 +- Fixed tests warning (admin.W411). +- Fixed changelist thead links color. +- Fixed changelist filter links hover color. ## [0.13.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.4) - 2020-09-04 -- Added conditional imports to avoid Django deprecation warnings. #92 -- Changed admin header content vertical align to top. +- Added conditional imports to avoid Django deprecation warnings. #92 +- Changed admin header content vertical align to top. ## [0.13.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.3) - 2020-09-02 -- Added `django-json-widget` theming support. +- Added `django-json-widget` theming support. ## [0.13.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.2) - 2020-08-21 -- Fixed related modal not closing on edit save and create with django 3.1 - #96 +- Fixed related modal not closing on edit save and create with django 3.1 - #96 ## [0.13.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.1) - 2020-08-18 -- Improved header and nav-sidebar style. -- Added `max-width` to logo. -- Added `requirements-dev.txt` +- Improved header and nav-sidebar style. +- Added `max-width` to logo. +- Added `requirements-dev.txt` ## [0.13.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.0) - 2020-08-05 -- Improved nav-sidebar style (`django>=3.1` support). -- Improved header style. +- Improved nav-sidebar style (`django>=3.1` support). +- Improved header style. ## [0.12.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.12.3) - 2020-07-20 - Fixed unreadable text in autocomplete multi-selects. #83 diff --git a/admin_interface/metadata.py b/admin_interface/metadata.py index 289885b2..3a4f509e 100644 --- a/admin_interface/metadata.py +++ b/admin_interface/metadata.py @@ -7,4 +7,4 @@ __email__ = "fabio.caccamo@gmail.com" __license__ = "MIT" __title__ = "django-admin-interface" -__version__ = "0.24.2" +__version__ = "0.25.0" From 8fd00c6c271d607bce770a9e648206efddfade3f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 18 Apr 2023 18:22:17 +0200 Subject: [PATCH 072/232] Update translations. --- .../locale/de/LC_MESSAGES/django.mo | Bin 3765 -> 3820 bytes .../locale/de/LC_MESSAGES/django.po | 6 +++- .../locale/es/LC_MESSAGES/django.mo | Bin 2300 -> 2359 bytes .../locale/es/LC_MESSAGES/django.po | 6 +++- .../locale/fa/LC_MESSAGES/django.mo | Bin 2994 -> 3025 bytes .../locale/fa/LC_MESSAGES/django.po | 30 ++++++++++-------- .../locale/fr/LC_MESSAGES/django.mo | Bin 3675 -> 3731 bytes .../locale/fr/LC_MESSAGES/django.po | 6 +++- .../locale/it/LC_MESSAGES/django.mo | Bin 2814 -> 2871 bytes .../locale/it/LC_MESSAGES/django.po | 6 +++- .../locale/pl/LC_MESSAGES/django.mo | Bin 2835 -> 2889 bytes .../locale/pl/LC_MESSAGES/django.po | 6 +++- .../locale/pt_BR/LC_MESSAGES/django.mo | Bin 3275 -> 3343 bytes .../locale/pt_BR/LC_MESSAGES/django.po | 6 +++- .../locale/tr/LC_MESSAGES/django.mo | Bin 2903 -> 2976 bytes .../locale/tr/LC_MESSAGES/django.po | 6 +++- 16 files changed, 52 insertions(+), 20 deletions(-) diff --git a/admin_interface/locale/de/LC_MESSAGES/django.mo b/admin_interface/locale/de/LC_MESSAGES/django.mo index 0a078206e7ee8dfb823509467c0b446af9204662..fed60dbd047a5a7212fad80179b0b8293bc126b2 100644 GIT binary patch delta 1232 zcmXxjOGs2v9LMo99HqsHnYK&tY_FxU3Lrq{DHQ*KGXRcarSZ`q!{nMz4JVs6MC2Ge$*!y{0OZ%tp zliw^;S&zZ8VxlnWfhYzrX8RKur+o-D;20|5b=$s+O8gM@{xj5sU!!(p4oPJ`Vm*FF zZ!48QRF3#KPqOK(2YCAwPM{LZ<0kxy+MyNH1S&WmtuTx_>kecna}1RziF&^e^;`zE z^_Nf+od~l3hpF7O9rLKI&ZA!Vh8kcAwL>n;P=6ij<7+|PKaN^yKPth1ZJ)Oeq23!o zEpQUGpa&uLUjx0OL*`KvSVj%_4>h36bhV<8wFb2l4X6pktlg+Yy;%5mP)9h9N;rwy zse7nAPdqC6s%KGK`o`W^K>a22s08&qv>Dq`1D`~Fq$yN_%cu!oLnW9(9mRdr!X9B1 z=a7>&U4%+NH&x=?Nlex zPV6JL5eJCXqJ{0v&N{8lJE^h7g_7X9i-;AQg)fBJnjN`-`_>;y4UT5U(viX8q2ZC- X`%=#hM$V=)7bB?)^yj+EM}7YR^G|8? delta 1197 zcmXxiO-NKx7{>8;>`qSV*yLAQV`6INn3bt%<{+35^rg@&+DTAELT!p5G%i@=#)UDq z5{wqLsN6KPX^2{8&?1N!qS{O?GTRKHB1!!pJs#$r-#O>rd*1W4Q2nCX|5oDNH%bo? zCH@A?&f=F%{89D>&1$g;2k<0r#c9<0Pq7f+VljSnX0e=h&OHxpHp{17hGC4Z>syQp zKkMQzg1s2SLDaw_=;1gj!Gv=f_5KsrPNN2Xheen{a@!B&XTMxK=i18{G2iSTl?q;n zFuf9N#47B@GEAT*a2Yk=Rpe*aouke>xQ+e^)I?@b6MTl+u~%4t?_GZeOUZ9PsVKp! zdm%4mwuN>W)xRA(F^U=}fl742wQryj-bE#tLQV7mY9}5cL)&xQi7&AZKcU~pd9P5> z8OQnhG!CH>%;FAwjoO*ds0sW=t!x!_#>JcyLs&g3Q48w(4%Br;;!BAJb@Z-5VgSbs0H0djWbik z{;QIvLlelL2K9bN{~Pu!7yq;*RUQZkrTEfgo>W2947V< z$&gnWuw<=w>|!%bU5kyPG=~W7!)~IR&>Gtal_sK+I6%}8+9zGpeMAS*NE{_LN)MIx q\n" "Language-Team: LANGUAGE \n" @@ -197,6 +197,10 @@ msgstr "Linkfarbe bei Auswahl" msgid "rounded corners" msgstr "abgerundete Ecken" +#: admin_interface/models.py +msgid "link active color" +msgstr "Linkfarbe beim aktiv" + #: admin_interface/models.py msgid "background hover color" msgstr "Hintergrundfarbe beim Überfahren" diff --git a/admin_interface/locale/es/LC_MESSAGES/django.mo b/admin_interface/locale/es/LC_MESSAGES/django.mo index 01bfe2422fd928e127f95f77d1d52995f234de12..15f9df16f3b417ea47eb8a9f956eb779856e1133 100644 GIT binary patch delta 769 zcmXZaKS*0q6vy$CmsAs*7!5SBH8pv*!GB0Pv{0mj5usC|AjL%l5eG>mt%%s6c_27A z%Bv32$-ymC5QidkXuAjwg1Fg2p%g-qLdSr9f8<@>y`Ou-J@=e{$ zo~2KR%${MzVW3Th&F*0dU7W=vzDMof#%?@B?K{G|c#55Pi3$9H9rzbV@jtT9vs}cC z$Ho|X@CoX`5-RXD#&I6+U>SALyI{Q$tZS(FEllGcrm&8R`+_RyJNDukc9GwHGEra? zd8`!}B1&)CfnAtJ9po~opdr+OPw_3c_5zi-PIVLb75ni93)s(QB`)E8oWUshZG{Ps ztuv_N8YQ55NKN(<*L$P*z59<8BU|mEm%D^7b`M>yO$BpTB z)CT=sXDFsuQFhn==HwE2W)JCVS^uAtDLi7PDwRo1-$K_lKv%UCVUHW*;k{6NVR3DF aeJQ_KtyEVVCz11TEI-`-ZN&GYA8rAqo<{os delta 713 zcmXZaPbkA-9LMqR{;>Ho+kWNmu#GLn#YkyUZjy3xBXL9dlTx_M$;Cze;^v~1i&7H@ zIQbP84pl}&rpTV zQF)iBg7>Jr7gXW0xBm*e%l?6y3?FHv-BW*0O(!b_r`#8RGNS(VH~Js0FVLLrVyR|S dSVLE?Tj^l7FsW_b#nHf#ulNys3b>Eql|N{~J{kZ3 diff --git a/admin_interface/locale/es/LC_MESSAGES/django.po b/admin_interface/locale/es/LC_MESSAGES/django.po index 7c8e6a24..0e74a17d 100644 --- a/admin_interface/locale/es/LC_MESSAGES/django.po +++ b/admin_interface/locale/es/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 02:56-0600\n" +"POT-Creation-Date: 2023-04-18 11:06-0500\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n" "Last-Translator: Martin Vuelta \n" "Language-Team: Spanish \n" @@ -201,6 +201,10 @@ msgstr "color de enlace" msgid "rounded corners" msgstr "esquinas redondas" +#: admin_interface/models.py +msgid "link active color" +msgstr "color de enlace (active)" + #: admin_interface/models.py msgid "background hover color" msgstr "color de fondo (hover)" diff --git a/admin_interface/locale/fa/LC_MESSAGES/django.mo b/admin_interface/locale/fa/LC_MESSAGES/django.mo index eea320d252d862e31adc926dfb00181bc4657130..537e1295fc333589927984bba40d74d970636412 100644 GIT binary patch delta 963 zcmXZaKWLLd7{~FaNow<^shU_5lR6}}wkGW$4uXm}Nx{X69Yp95gNPs&M8u&O3awFy zgB&fmxHtqsj2b}&iGwJu6s5SlFNr$nqVA%C;`b*x-n-A;``(}D?!8Cp^>pQ9GO}c( z3G#OGT#wlS?1U&tD`B&(xQcoFgh#O_Vzvp7p~jVPBVIxEzk&UD2m7#r1Na0t;49p0 zR{P^7C}*D*mmz!-i~c>IO-%4sD62*i%p;c-GiF<5Dwua4r3Xo zD;#&V`=LWG9q~_`!EDrQ3tmPAQbQf>?XHiJ$KFsVfcKce&&ZVa2h~5~u_$Iy-%lZ* zYz`|r`b8>=>;a~64b|}rYKMPO1Hx=iJB(APoklH?L*1XfsCmjbh85KKIx3)h$YV_k z1>A~p{#hz-yDz@tDD7XU1#(;n4J@Dn+KsvcN02Ud0(W8=b=22UC%BB;@F{Y@|C8>3 zev1O$LDrqhnEMt=4vbJ${F-8y^TOi={htC^K`3cbEjUirj`TZ}#@tMJIH3@VWbH{m zY_xeZd@vL*l`o#XbUIg_JvV!yxzhVQ%l@UXtis>wcx7XaIa%iF4KSOA1#}8b^rhX delta 982 zcmYMxO=uHA7{>9}BsIy_)_$nfrb=s@)--}gE#e_iEqKv_=taGV9!k}Vpa&%iCb{Gm zg7l;wG=9;LMq4W)2!aTT6hwC$5EKMaQG=JBs{dyjaG2TO%o26doeW zC-t8F?FqA#+V^-2m#`BLN6gxB0ypACRBDSzwfj7DfQP87dx6BXPpElcaSWFm-}gmV z)}26Qd=k@J=v<@IjkBmg3#dQ+iMoH)S%NzzeP$%xd?WjLIibHq-wf+X`K(~-; z4|wRna}8fQcFG2M@qrf#yo_29W>+1g6?NxHpJnBGGNM`+_JJ)q6 z6McnxAl9Pft7zp=VN)=f*h+63O?#^(Y1(I)rXNuDRR#;EgZ=FT^b$1vg6=0?y&2pS zsQzx64Fo@5&KGV+_WFL0T=AWZ9vtDlmvc+Ce6L$_r)zn)VqV5AdsqK|U|ezUxp&+- zbIXf&y^NPrv>(x!A0_Mz^e}d3yi6_cWxbra6)(G3?)9FzRZUDe#X{W~^C$0Wp85w_ CZ\n" "Language-Team: Farsi \n" @@ -47,15 +47,15 @@ msgstr "مسیر صفحه" #: admin_interface/admin.py msgid "Generic Links" -msgstr "لینک‌های عمومی" +msgstr "لینکهای عمومی" #: admin_interface/admin.py msgid "Save Buttons" -msgstr "دکمه‌های ذخیره" +msgstr "دکمههای ذخیره" #: admin_interface/admin.py msgid "Delete Buttons" -msgstr "دکمه‌های حذف" +msgstr "دکمههای حذف" #: admin_interface/admin.py msgid "Navigation Bar" @@ -63,7 +63,7 @@ msgstr "" #: admin_interface/admin.py msgid "Related Modal" -msgstr "مدل‌های مرتبط" +msgstr "مدلهای مرتبط" #: admin_interface/admin.py msgid "Form Controls" @@ -71,7 +71,7 @@ msgstr "" #: admin_interface/admin.py msgid "List Filter" -msgstr "فیلتر‌های لیست" +msgstr "فیلترهای لیست" #: admin_interface/admin.py msgid "Change Form" @@ -79,7 +79,7 @@ msgstr "" #: admin_interface/admin.py msgid "Recent Actions" -msgstr "فعالیت‌های اخیر" +msgstr "فعالیتهای اخیر" #: admin_interface/apps.py msgid "Admin Interface" @@ -170,7 +170,7 @@ msgstr "نمایش" #: admin_interface/models.py msgid "background color" -msgstr "رنگ پس‌زمینه" +msgstr "رنگ پسزمینه" #: admin_interface/models.py msgid "text color" @@ -188,7 +188,7 @@ msgstr "رنگ لینک در حالت هاور" #, fuzzy #| msgid "background color" msgid "background selected color" -msgstr "رنگ پس‌زمینه" +msgstr "رنگ پسزمینه" #: admin_interface/models.py #, fuzzy @@ -198,11 +198,15 @@ msgstr "رنگ لینک" #: admin_interface/models.py msgid "rounded corners" -msgstr "گوشه‌های خمیده" +msgstr "گوشههای خمیده" + +#: admin_interface/models.py +msgid "link active color" +msgstr "رنگ فعال پیوند" #: admin_interface/models.py msgid "background hover color" -msgstr "رنگ پس‌زمینه در حالت هاور" +msgstr "رنگ پسزمینه در حالت هاور" #: admin_interface/models.py msgid "background opacity" @@ -254,13 +258,13 @@ msgstr "تم" #: admin_interface/models.py msgid "Themes" -msgstr "تم‌ها" +msgstr "تمها" #: admin_interface/templates/admin/change_list.html #, fuzzy #| msgid "List Filter" msgid "Filter" -msgstr "فیلتر‌های لیست" +msgstr "فیلترهای لیست" #. Translators: don't translate this, the django catalog already contains it #: admin_interface/templates/admin/change_list.html diff --git a/admin_interface/locale/fr/LC_MESSAGES/django.mo b/admin_interface/locale/fr/LC_MESSAGES/django.mo index d9ba0e6af501efbd624c91a60f37923096a38faf..1f2544609a30e7d070d83926d1de0f3376857834 100644 GIT binary patch delta 1232 zcmYk+OGs2v9LMp$IuBj<**hK#t>bbkP0;f^;&tU^rFo>TpfM2i? ze^xEpk{bv!8fBmvyD*8G;0O}ij-vvMqVCJP{uR`OcQAsJ$dvX7`Lk))FT4J8)bp>f z&5Ep$Mhh3d;~M;nt1!m06}THUVFtC6tn;9A0JVT2)Wjp$jOQ?nSKam7xRU-9YTjoW zC%%kKtq55f5z#J;T0BV6pQ5hIU9<^~?hk5M4TiD0(KE*cr zzX)2?nFg3eXP!a@xQI!-iQ35%Ts~7&;0h|hJd!N?hRWOmDwAQ(O&f}%GTDiHu?IDO z0hNL44dh=bxxocZFo_CScKz3=@p)9B->AS#s2%&*t_))gqo{dOsGaxYdK^V<;4&(( zhnnYpg#2rz54a#7yMYPd%EnM6&TL)K=!&Oy|NbPNaa1nMPz zh+5c8k%m5>3a-Wl)JqiNF70eBY9|TQihEE;a~QYcY2-+k&o_trsLF(j-k~j2PQ^A+ z-4|`!X{%_V-q*TlYlen`sObLy?}zR38hzPxnwG*U`6`>MSU1M0I#uOux0m;I4)3R> zEOb#-w8ITlEwq;Uf7$6e317NOCA10wULu!=g(XiPmE2R VohXz>f(3sdp-ZPqFCtSl{{T4@XBYqg delta 1174 zcmYk*OGs2v9LMqh=$*NmV~;7daz-6%H0?3=auSM&Rw}(VZK7z=gP;O8L6HtEg2HIg zC5VLC2~oMI*|alg(W)0M0s|LeFh#a=Q;YikX8sEg9zXZobMOCu&i~wrGGEih`Bd=G zXhZZgeIaIc44>EYk5&oHTJQ&E@gHhF8#h~pW2pCT;Yuu_o}a-ce1jo=zyyB5W}L5C zv|m2)2Ujx@uDrIEjR^N64R*d_3*rXQ=mIVyhKd zAr~ob%;5%H#B~_5Y$Z;k0%lP=>2>pN0kwdGsK7^X1)lNoC0xt+1}fftpO3JS{8sXb zCs<%SgDUNJT!TwK4jXET+E58{sD%xnc0PzaYKO5MM{yHg#6ukGB(^es*H}Bs1uW_; z6GT(Olh}JuN&Tcyu%evL}-5mmyUsDLrbLT*dADbx?A14pnM_0e8IE$Ald*D{6c z@zpsl^wE66>dsI*sGwFF@V1U5iCZy`9A))f_o2$G3aAazd+1c(Hq-qVY}=#7`u3Iq z?kKX_5S@>~c1D??(6@yv?GFcVe`G%e-mw8H2?qr diff --git a/admin_interface/locale/fr/LC_MESSAGES/django.po b/admin_interface/locale/fr/LC_MESSAGES/django.po index eea2a991..fd15ab34 100644 --- a/admin_interface/locale/fr/LC_MESSAGES/django.po +++ b/admin_interface/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 02:56-0600\n" +"POT-Creation-Date: 2023-04-18 11:06-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -198,6 +198,10 @@ msgstr "couleur de lien choisi" msgid "rounded corners" msgstr "coins arrondis" +#: admin_interface/models.py +msgid "link active color" +msgstr "couleur de lien actif" + #: admin_interface/models.py msgid "background hover color" msgstr "couleur de fond au survol" diff --git a/admin_interface/locale/it/LC_MESSAGES/django.mo b/admin_interface/locale/it/LC_MESSAGES/django.mo index 540e31c51b5546bae2bf2b1709aeb4b0a17e6284..034fc9049f2f6a6b0ae06cc7f804deeb052da493 100644 GIT binary patch delta 893 zcmXZaPe@cz6vy#1e{`I2#+vb8Lov=|YBRbTM34v}2yvBBt3YuWq=ZP2K@h~ZEC`7h zYT?#}x)3235`vqO6k6oMg`$QV$=tb+S}1;hdN1$3&wVrJoqOJS@1lOC!8=FeK{rOR7dh-XCnbF0t_$w^CF=e+*nl1;@H5uo0tVUN z)>v@ZH%_W_)47Flu6HnkC#ZyHr~*UmDx;`Q#8Gh>B*Z#Uh2~Ltd+;{)Vlx(T(4*aN zS*XGzqPp-LpJ8W}Sqk4_6V9RHeqa(0ki-6Q(gwcpb%(-8N^8VgOkp1Ls7?-}3NN9j zC!BD9yvH=xGpH7=q5^+8w^50AorkE7{6Q7;ANB5QX~QkdqT(Mp`%sj!r#`DfaRH0u`8-7P6-bS@}57midRHshy9wzvpXz0l^bDDl%s`ElgyB{Pap&j0`b delta 847 zcmXZbKWI}?6vy$?5J3c?;v$t&Xs1%>q8S7S(SCog_j2F;-21ri-1E*$-lzYiYKKYh zh0!Ltu5wko%NdV%|x zz!KI}+GQrA_!NWEpf=W>4OHN!^8>0PpHT_@Kz;KL4q$|GX#c1)kE+xyRKl}vy%4pf z;DLwS(18_a6_w#L)Isa0fUi)c-9lc@-k~bg!W+1cR5oa;m_COR%lMtpa7@KlQ-r)f z7@jPQF}um7SZewc5F+?JDj(&bHts(TXA?T1z@=AFeRGY?@Jy)jt9#A!H=^5T9E(Z1 diff --git a/admin_interface/locale/it/LC_MESSAGES/django.po b/admin_interface/locale/it/LC_MESSAGES/django.po index 5681c6be..4918b8c9 100644 --- a/admin_interface/locale/it/LC_MESSAGES/django.po +++ b/admin_interface/locale/it/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 02:56-0600\n" +"POT-Creation-Date: 2023-04-18 11:06-0500\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n" "Last-Translator: Fabio Caccamo \n" "Language-Team: Italian \n" @@ -203,6 +203,10 @@ msgstr "colore dei link" msgid "rounded corners" msgstr "bordi arrotondati" +#: admin_interface/models.py +msgid "link active color" +msgstr "colore dei link attivi" + #: admin_interface/models.py msgid "background hover color" msgstr "colore di sfondo in hover" diff --git a/admin_interface/locale/pl/LC_MESSAGES/django.mo b/admin_interface/locale/pl/LC_MESSAGES/django.mo index 9a5a6bb646deda0ed512409d2475262a7301f7a9..0587f3fdf49fd1c389fa5643fe07e7364236c578 100644 GIT binary patch delta 899 zcmXZa!AsL&9LMpm+jP1%ZELMof$4vLd5W5Cq?OyVuvwBWMe{DG0=V&K_oiF zkNg9wi(Wi<2rpeka2iM_5llM-K?&Xzywv+szlS})*Yo@BdA`s0`SN(FTFO02gx(n~ zPj98q)tU9+VSop1J7{(lYuJv*ID~Z}vlbjitt((NzCz7^gO~6FhH(vJ_z4?u3oo0w z_Ju)?58qG=8tcs%S`wLHX;k1GD!>Db;sElq$2=5p%zrQV?^CGt6-=Rv30%e`u3(7$ z?K1;@w#h@8)_lKWoc9Ba;BQpGGgN|Mc9l_7CE}=g?Z_0%qY}M~ira@baR589h~qBh zUSyz>{a{u8C*1brY?uA;H_cYiUzs)E|*DcU-?ySEJ p_6DMb;_UQ`NvAkdo_V&uUB4KL6-u+!mzAnhp01RhdygW!e*v@nQ%nE= delta 847 zcmXZaKP)6+7{~F)?ks1|I=jm{)}PyB&#qNmMR8FO4UKFe3Zf8ys&mC@6tZ^((GL-o zY(+z}k(@*%E)?YC8imGn*KEV8M1k*b&6|1W^S(3h`^+=X%z4a><^DyS4Wnh~E%e0- zvoH9^$BFjKZ`Oc^n83d{iY0u91J3KdEY>n#K&@ZKx9DOOZes{{uo4fj&Map~47#~+ ziQ4dh9OeYd3#=LyxEU27jWyVZ95%#B0Y|)f)|-zb53nhW;Wv!nD%Rr`Iy~R@8E{yE zlQKQ@Ji#FIb5x)!RAT=M0RqSielhXu(-3D%+FwPGBT*ntB$NtI`@f#=(ARt@4c z&S3nF*$4cADa@lXzd&VvgR0a$62qQQl?hb8CKAQ>%-c{8>_e@aK)t{;D#3ZoMHwtI zP>I)2-)<9?`5qG64p0G(z3XSFH@-yu6W7>?kJy9}Zt{Cr52_-cQ3>~=;tYE8;h@cx zGaciCGFw1x_>RrEgvxXswK0!+vt3kTC)kb`n8G4b*>cl2S1i3y!Y%pYA=N@n5xd+b ye\n" "Language-Team: Polish \n" @@ -203,6 +203,10 @@ msgstr "kolor linku" msgid "rounded corners" msgstr "zaokrąglenie narożników" +#: admin_interface/models.py +msgid "link active color" +msgstr "kolor aktywny linku" + #: admin_interface/models.py msgid "background hover color" msgstr "kolor tła wskazywanego przycisku" diff --git a/admin_interface/locale/pt_BR/LC_MESSAGES/django.mo b/admin_interface/locale/pt_BR/LC_MESSAGES/django.mo index 024f9f6ae60687638a0cb2cbcd459fd4c6ebe662..c81bb244bbcf4a81c2c2132e1e668abe80183094 100644 GIT binary patch delta 1244 zcmXxkOGs2v9LMqh=wwr4nxmyNJ-n4YMs3P6DVXT7($z%Zw25FCrx=okLVCkpL`1l- zO|>d27X~f@hbV&F3>5T0XqAM~A|hI}ObDXBzk5%I`@f%a&)oC)pL6wXaw6q_PDF1T zWq?>qyo;C(;njL>lm}6>RrnA$;4{qOJT_x`N!V{6Hu0QCyzQPLN3d>=e&D9j_O~;)i{O; z=C^SwNgD2B8$L%({2n#n2UG?honKHBf5#U5h08IdSswFv5mPva z`uzv`nlQpF+JP2~VGlBf^IX6SSii)QehSA1bqhuKft={b5u_W#?togyYC%cerUmlc)txqjq){ z*W+v4hTnWD99d90xo;x7s+mYBRxn$=)h?#;Y*yrceoMrYn$y#n4>&~em{;`yo71Ij%|1|I)&>( zsD>FHHu2&a4&Xf6@GCM#_>OkGjDGhgmeaJh!%l3)KIByxMy_x)md9fG6x#kYcH#vr zFn+kfLpK%ou^ng8f#0AVE}#)CMn9kff5r^f(T;y&5&xp?b2RdO5jS8jTHlYZ+&;`R zemD^;CeV&2(T3O13EV;>yo+4nA-63!gS+rGo@CpW(8xL%&8-^3b9e@Oa1MRHh)&=e zR*ig_hxM3ZRQd=R?7{*X*&uR-=zo*3R>UFENqZRBPmBm(Sa(+70z;VB9rJuub?Y>8+-8{_TwvLr@{fU zD_?T|SEv0H{230Cosj7uxux;cJlRHMazg%WT@hE!)JHx{-cH_2j=y4_nrFaCxfQ0( zH&0xjG9Gjob(|yd6+$@tJ59|1F?dY c&NcolhN(D2Zm+#aF1FO#(qEF=O17B#4~MZ&&j0`b diff --git a/admin_interface/locale/pt_BR/LC_MESSAGES/django.po b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po index e4e71e59..ec8bf7e1 100644 --- a/admin_interface/locale/pt_BR/LC_MESSAGES/django.po +++ b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-26 02:56-0600\n" +"POT-Creation-Date: 2023-04-18 11:06-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -200,6 +200,10 @@ msgstr "link cor selecionada" msgid "rounded corners" msgstr "cantos arredondados" +#: admin_interface/models.py +msgid "link active color" +msgstr "cor de ativação do link" + #: admin_interface/models.py msgid "background hover color" msgstr "cor de fundo do foco" diff --git a/admin_interface/locale/tr/LC_MESSAGES/django.mo b/admin_interface/locale/tr/LC_MESSAGES/django.mo index 20f779fcb3ff3ebaa93c65b909d96ecc89c92cba..9a1606f05849b46d88fc1f453c8a202967e0e363 100644 GIT binary patch delta 913 zcmXZaOGs2v9LMqhJj|JC%w}>d@xl1kaW*|5GSsCILI_D9wHU^6y38=5NUQL!s#S}a z3S1eqh!*0)z>T<3VU#wmB(TI*K4>Emt-|k5?_uuwoO|b-^Z%d!y}R`vue(3v!S_Z> zb2V|j@R{AmJwF|-5->~P7PjI(K15&8tQJR6>oRx+=TP(C;AQ-T)wqN;xPq5(6R(=N z_KiV`2R~2?LRDrAtqz%B4XBM%s15F66o-+YJ)+Zwg3y~iF>FM93V062o?Agb@G3xR~X{>H}E#dz+G+6oAAFt_PnC4P$J>_tquUGF!i71GgzIj{LxHy)_I;wW~Yi%Gs~5#&%wq_Vb+;U=5s}-G~sM4(B}$Hawb>GJLPQT&l%dK BSOEY4 delta 847 zcmXZaODIHf6vy#n=6a3ic)!cruq8znN)|S92R&b%?|xQnE}+Byw#9_YB0N;-uICX3Sf8L0 zU7`wm@O(yf;0+b`i(D3<8Wot1%2$kqSc&D>ioJAs2us-C4vFf!!le$ zRepjhl#!C2T%tXN5xNJSpS%1qSh{A5I0bPd#DW# zklc2R+V}!>@@v#j_lS8IqzyW0E%JF-J1S2Hs<2K}zCP4J1_L&1AtsYv;F9Mm>Nnd& zeG`YM0!~pIU7-@aqCVU&tj98f>1=f9eHE*ZvDE$W6{e{98Y-pQ&G*-Z)ZH3x<\n" "Language-Team: \n" @@ -205,6 +205,10 @@ msgstr "bağlantı rengi" msgid "rounded corners" msgstr "köşeleri ovalleştir" +#: admin_interface/models.py +msgid "link active color" +msgstr "bağlantı aktif gelindiğindeki rengi" + #: admin_interface/models.py msgid "background hover color" msgstr "arka planın üzerine gelindiğindeki renk" From 3d0930bf560ba3baa06e92901d42d3b5ed23b8ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 07:35:58 +0200 Subject: [PATCH 073/232] Update pre-commit hooks. (#273) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41cba362..aeb15a75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: args: ["--profile", "black"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.261 + rev: v0.0.262 hooks: - id: ruff From cacae6eb7392780fab3e3ae90c5b0420678704c9 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 20 Apr 2023 13:09:03 +0200 Subject: [PATCH 074/232] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aeb15a75..be3244a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,10 +14,11 @@ repos: - id: django-upgrade args: ["--target-version", "3.2"] - - repo: https://github.com/psf/black - rev: 23.3.0 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.262 hooks: - - id: black + - id: ruff + args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/pycqa/isort rev: 5.12.0 @@ -25,10 +26,10 @@ repos: - id: isort args: ["--profile", "black"] - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.262 + - repo: https://github.com/psf/black + rev: 23.3.0 hooks: - - id: ruff + - id: black - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 From 546ed765a359b6b1e63a08fc7264d31259cd8a8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 18:53:46 +0200 Subject: [PATCH 075/232] Update tox requirement from ==4.4.* to ==4.5.* (#275) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index bfd89c5b..3ac78a66 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* pre-commit == 3.2.* psycopg2-binary == 2.9.* -tox == 4.4.* +tox == 4.5.* From cdc281396f32b79aab23fa0348352fea519bc04d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 18:57:06 +0200 Subject: [PATCH 076/232] Update pre-commit hooks. (#274) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be3244a0..db13a721 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.3.2 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.262 + rev: v0.0.263 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From cd361c461d38951d344cca728b7f8f7d909910d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 09:28:23 +0200 Subject: [PATCH 077/232] Update pre-commit hooks. (#277) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db13a721..57f17bd0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.263 + rev: v0.0.264 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a5c4c82d9ac57dcf630fb0c634e73797ea104345 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 May 2023 13:44:57 +0200 Subject: [PATCH 078/232] Update pre-commit hooks. (#279) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57f17bd0..e7fb1135 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.264 + rev: v0.0.265 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a92d94f9e85d1384f461c12cf7a6216887645a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 May 2023 13:47:09 +0200 Subject: [PATCH 079/232] Update pre-commit requirement from ==3.2.* to ==3.3.* (#278) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 3ac78a66..de2d334c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* -pre-commit == 3.2.* +pre-commit == 3.3.* psycopg2-binary == 2.9.* tox == 4.5.* From a8897a942d6755996b8c33f82806c95ed84f0d7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 May 2023 09:22:13 +0200 Subject: [PATCH 080/232] Update pre-commit hooks. (#280) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7fb1135..a484172e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.3.2 + rev: v3.4.0 hooks: - id: pyupgrade args: ["--py38-plus"] From a48575e0471b327eeba3c2c03f7f51c6ac476f86 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 11 May 2023 01:33:35 +0200 Subject: [PATCH 081/232] Add collapsible inlines support. (#282) * Improve code formatting. * Add collapsible inlines frontend support. * Add collapsible inlines options fields to model and admin. * Add option classes to body. * Update translations. * Update README.md --- README.md | 1 + admin_interface/admin.py | 25 ++++++++++- .../locale/de/LC_MESSAGES/django.po | 22 ++++++++- .../locale/es/LC_MESSAGES/django.po | 22 ++++++++- .../locale/fa/LC_MESSAGES/django.po | 22 ++++++++- .../locale/fr/LC_MESSAGES/django.po | 22 ++++++++- .../locale/it/LC_MESSAGES/django.po | 22 ++++++++- .../locale/pl/LC_MESSAGES/django.po | 22 ++++++++- .../locale/pt_BR/LC_MESSAGES/django.po | 22 ++++++++- .../locale/tr/LC_MESSAGES/django.po | 22 ++++++++- ...me_collapsible_stacked_inlines_and_more.py | 42 +++++++++++++++++ admin_interface/models.py | 17 +++++++ .../collapsible-inlines.js | 45 +++++++++++++++++++ .../css/admin-interface-fix.css | 4 +- .../admin_interface/css/admin-interface.css | 22 ++++----- .../templates/admin/base_site.html | 7 +++ .../admin_interface/collapsible-inlines.html | 5 +++ 17 files changed, 322 insertions(+), 22 deletions(-) create mode 100644 admin_interface/migrations/0030_theme_collapsible_stacked_inlines_and_more.py create mode 100644 admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js create mode 100644 admin_interface/templates/admin_interface/collapsible-inlines.html diff --git a/README.md b/README.md index ca70c0d1..09d145bd 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl - Language chooser - Foldable apps *(accordions in the navigation bar)* - [Collapsible fieldsets](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets) can have their initial state expanded instead of collapsed +- `NEW` Collapsible inlines - `NEW` Tabbed fieldsets and inlines - `NEW` List filter removal links - `NEW` List filter highlight selected options diff --git a/admin_interface/admin.py b/admin_interface/admin.py index 42ac7eb0..504fe43b 100644 --- a/admin_interface/admin.py +++ b/admin_interface/admin.py @@ -133,7 +133,13 @@ class ThemeAdmin(admin.ModelAdmin): ), }, ), - (_("Navigation Bar"), {"classes": ("wide",), "fields": ("foldable_apps",)}), + ( + _("Navigation Bar"), + { + "classes": ("wide",), + "fields": ("foldable_apps",), + }, + ), ( _("Related Modal"), { @@ -179,9 +185,24 @@ class ThemeAdmin(admin.ModelAdmin): ), }, ), + ( + _("Inlines"), + { + "classes": ("wide",), + "fields": ( + "collapsible_stacked_inlines", + "collapsible_stacked_inlines_collapsed", + "collapsible_tabular_inlines", + "collapsible_tabular_inlines_collapsed", + ), + }, + ), ( _("Recent Actions"), - {"classes": ("wide",), "fields": ("recent_actions_visible",)}, + { + "classes": ("wide",), + "fields": ("recent_actions_visible",), + }, ), ) diff --git a/admin_interface/locale/de/LC_MESSAGES/django.po b/admin_interface/locale/de/LC_MESSAGES/django.po index e01d7132..73683d94 100644 --- a/admin_interface/locale/de/LC_MESSAGES/django.po +++ b/admin_interface/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,6 +78,10 @@ msgstr "Filteranzeige" msgid "Change Form" msgstr "Änderungsformular" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Neueste Aktionen" @@ -241,6 +245,22 @@ msgstr "Fieldsets als Tabs" msgid "inlines as tabs" msgstr "Inlines als Tabs" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "angeheftete Schaltfläche" diff --git a/admin_interface/locale/es/LC_MESSAGES/django.po b/admin_interface/locale/es/LC_MESSAGES/django.po index 0e74a17d..af725537 100644 --- a/admin_interface/locale/es/LC_MESSAGES/django.po +++ b/admin_interface/locale/es/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n" "Last-Translator: Martin Vuelta \n" "Language-Team: Spanish \n" @@ -79,6 +79,10 @@ msgstr "Lista de filtros" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Acciones recientes" @@ -245,6 +249,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "" diff --git a/admin_interface/locale/fa/LC_MESSAGES/django.po b/admin_interface/locale/fa/LC_MESSAGES/django.po index a81cbd6d..90d098f9 100644 --- a/admin_interface/locale/fa/LC_MESSAGES/django.po +++ b/admin_interface/locale/fa/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Amir Ajorloo \n" "Language-Team: Farsi \n" @@ -77,6 +77,10 @@ msgstr "فیلترهای لیست" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "فعالیتهای اخیر" @@ -244,6 +248,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "" diff --git a/admin_interface/locale/fr/LC_MESSAGES/django.po b/admin_interface/locale/fr/LC_MESSAGES/django.po index fd15ab34..5b5f1464 100644 --- a/admin_interface/locale/fr/LC_MESSAGES/django.po +++ b/admin_interface/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,6 +78,10 @@ msgstr "Filtre de liste" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Actions récentes" @@ -243,6 +247,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "envoi adhérent (sticky)" diff --git a/admin_interface/locale/it/LC_MESSAGES/django.po b/admin_interface/locale/it/LC_MESSAGES/django.po index 4918b8c9..458c1b9c 100644 --- a/admin_interface/locale/it/LC_MESSAGES/django.po +++ b/admin_interface/locale/it/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n" "Last-Translator: Fabio Caccamo \n" "Language-Team: Italian \n" @@ -79,6 +79,10 @@ msgstr "Filtro listato" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Azioni recenti" @@ -247,6 +251,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "" diff --git a/admin_interface/locale/pl/LC_MESSAGES/django.po b/admin_interface/locale/pl/LC_MESSAGES/django.po index 60cf4a49..127fd7b1 100644 --- a/admin_interface/locale/pl/LC_MESSAGES/django.po +++ b/admin_interface/locale/pl/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: 2022-02-04 19:13-0500\n" "Last-Translator: Kamil Paduszyński \n" "Language-Team: Polish \n" @@ -79,6 +79,10 @@ msgstr "Filtry" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Ostatnie działania" @@ -247,6 +251,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "" diff --git a/admin_interface/locale/pt_BR/LC_MESSAGES/django.po b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po index ec8bf7e1..78169b0b 100644 --- a/admin_interface/locale/pt_BR/LC_MESSAGES/django.po +++ b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,6 +78,10 @@ msgstr "Filtro de lista" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Ações recentes" @@ -244,6 +248,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "envio fixo" diff --git a/admin_interface/locale/tr/LC_MESSAGES/django.po b/admin_interface/locale/tr/LC_MESSAGES/django.po index f7117cbf..8ae3bba9 100644 --- a/admin_interface/locale/tr/LC_MESSAGES/django.po +++ b/admin_interface/locale/tr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-18 11:06-0500\n" +"POT-Creation-Date: 2023-05-10 18:20-0500\n" "PO-Revision-Date: 2020-01-29 04:53+0300\n" "Last-Translator: Ishak Okutan \n" "Language-Team: \n" @@ -79,6 +79,10 @@ msgstr "Liste Filtresi" msgid "Change Form" msgstr "" +#: admin_interface/admin.py +msgid "Inlines" +msgstr "" + #: admin_interface/admin.py msgid "Recent Actions" msgstr "Son İşlemler" @@ -249,6 +253,22 @@ msgstr "" msgid "inlines as tabs" msgstr "" +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "" + #: admin_interface/models.py msgid "sticky submit" msgstr "" diff --git a/admin_interface/migrations/0030_theme_collapsible_stacked_inlines_and_more.py b/admin_interface/migrations/0030_theme_collapsible_stacked_inlines_and_more.py new file mode 100644 index 00000000..5b77ee79 --- /dev/null +++ b/admin_interface/migrations/0030_theme_collapsible_stacked_inlines_and_more.py @@ -0,0 +1,42 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("admin_interface", "0029_theme_css_generic_link_active_color"), + ] + + operations = [ + migrations.AddField( + model_name="theme", + name="collapsible_stacked_inlines", + field=models.BooleanField( + default=False, + verbose_name="collapsible stacked inlines", + ), + ), + migrations.AddField( + model_name="theme", + name="collapsible_stacked_inlines_collapsed", + field=models.BooleanField( + default=True, + verbose_name="collapsible stacked inlines collapsed", + ), + ), + migrations.AddField( + model_name="theme", + name="collapsible_tabular_inlines", + field=models.BooleanField( + default=False, + verbose_name="collapsible tabular inlines", + ), + ), + migrations.AddField( + model_name="theme", + name="collapsible_tabular_inlines_collapsed", + field=models.BooleanField( + default=True, + verbose_name="collapsible tabular inlines collapsed", + ), + ), + ] diff --git a/admin_interface/models.py b/admin_interface/models.py index a72df076..a29f5238 100644 --- a/admin_interface/models.py +++ b/admin_interface/models.py @@ -368,6 +368,23 @@ class Theme(models.Model): verbose_name=_("inlines as tabs"), ) + collapsible_stacked_inlines = models.BooleanField( + default=False, + verbose_name=_("collapsible stacked inlines"), + ) + collapsible_stacked_inlines_collapsed = models.BooleanField( + default=True, + verbose_name=_("collapsible stacked inlines collapsed"), + ) + collapsible_tabular_inlines = models.BooleanField( + default=False, + verbose_name=_("collapsible tabular inlines"), + ) + collapsible_tabular_inlines_collapsed = models.BooleanField( + default=True, + verbose_name=_("collapsible tabular inlines collapsed"), + ) + recent_actions_visible = models.BooleanField( default=True, verbose_name=_("visible"), diff --git a/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js b/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js new file mode 100644 index 00000000..1f560f46 --- /dev/null +++ b/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js @@ -0,0 +1,45 @@ +/** global: django */ + +if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined') +{ + (function($) { + + $(document).ready(function(){ + + function collapsibleInline(scope, collapsed) { + var fieldsetCollapsed = collapsed; + var fieldsetEl = $(scope).find('> fieldset.module'); + fieldsetEl.addClass('collapse'); + var fieldsetHasErrors = (fieldsetEl.children('.errors').length > 0); + if (fieldsetHasErrors === true) { + fieldsetCollapsed = false; + } + if (fieldsetCollapsed === true) { + fieldsetEl.addClass('collapsed'); + } + var collapseToggleText = (fieldsetCollapsed ? gettext('Show') : gettext('Hide')); + var collapseToggleHTML = ' (' + collapseToggleText + ')'; + var headerEl = fieldsetEl.find('> h2,> h3'); + headerEl.append(collapseToggleHTML); + } + + var stackedInlinesOptionSel = '.admin-interface.collapsible-stacked-inlines'; + var stackedInlinesSel = stackedInlinesOptionSel + ' .inline-group[data-inline-type="stacked"]'; + var stackedInlinesCollapsed = $(stackedInlinesOptionSel).hasClass('collapsible-stacked-inlines-collapsed'); + + var tabularInlinesOptionSel = '.admin-interface.collapsible-tabular-inlines'; + var tabularInlinesSel = tabularInlinesOptionSel + ' .inline-group[data-inline-type="tabular"] .inline-related.tabular'; + var tabularInlinesCollapsed = $(stackedInlinesOptionSel).hasClass('collapsible-tabular-inlines-collapsed'); + + $(stackedInlinesSel).each(function() { + collapsibleInline(this, stackedInlinesCollapsed); + }); + + $(tabularInlinesSel).each(function() { + collapsibleInline(this, tabularInlinesCollapsed); + }); + + }); + + })(django.jQuery); +} diff --git a/admin_interface/static/admin_interface/css/admin-interface-fix.css b/admin_interface/static/admin_interface/css/admin-interface-fix.css index 66da0590..e4cb7eaa 100644 --- a/admin_interface/static/admin_interface/css/admin-interface-fix.css +++ b/admin_interface/static/admin_interface/css/admin-interface-fix.css @@ -121,7 +121,9 @@ } .admin-interface fieldset.collapse.collapsed a.collapse-toggle, -.admin-interface fieldset.collapse a.collapse-toggle { +.admin-interface fieldset.collapse a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle { font-weight: normal; text-transform: lowercase; font-size: 12px; diff --git a/admin_interface/static/admin_interface/css/admin-interface.css b/admin_interface/static/admin_interface/css/admin-interface.css index 44ef6952..bfa9ba40 100644 --- a/admin_interface/static/admin_interface/css/admin-interface.css +++ b/admin_interface/static/admin_interface/css/admin-interface.css @@ -192,21 +192,21 @@ color: var(--admin-interface-module-link-hover-color); } -.admin-interface fieldset.collapse.collapsed a.collapse-toggle { - color: var(--admin-interface-module-link-color); -} - -.admin-interface fieldset.collapse.collapsed a.collapse-toggle:hover, -.admin-interface fieldset.collapse.collapsed a.collapse-toggle:active { - color: var(--admin-interface-module-link-hover-color); -} - -.admin-interface fieldset.collapse a.collapse-toggle { +.admin-interface fieldset.collapse a.collapse-toggle, +.admin-interface fieldset.collapse.collapsed a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle { color: var(--admin-interface-module-link-color); } .admin-interface fieldset.collapse a.collapse-toggle:hover, -.admin-interface fieldset.collapse a.collapse-toggle:active { +.admin-interface fieldset.collapse a.collapse-toggle:active, +.admin-interface fieldset.collapse.collapsed a.collapse-toggle:hover, +.admin-interface fieldset.collapse.collapsed a.collapse-toggle:active, +.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle:hover, +.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle:active, +.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle:hover, +.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle:active { color: var(--admin-interface-module-link-hover-color); } diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index f39ae75f..76129a82 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -135,6 +135,7 @@ {% include "admin_interface/favicon.html" %} {% include "admin_interface/foldable-apps.html" %} {% include "admin_interface/related-modal.html" %} +{% include "admin_interface/collapsible-inlines.html" %} {% endblock %} {% block extrahead %} @@ -150,6 +151,12 @@ {% if theme.form_pagination_sticky %} sticky-pagination {% endif %} {% if theme.list_filter_highlight %} list-filter-highlight {% endif %} {% if theme.list_filter_sticky %} list-filter-sticky {% endif %} +{% if theme.collapsible_stacked_inlines %} collapsible-stacked-inlines + {% if theme.collapsible_stacked_inlines_collapsed %} collapsible-stacked-inlines-collapsed {% endif %} +{% endif %} +{% if theme.collapsible_tabular_inlines %} collapsible-tabular-inlines + {% if theme.collapsible_tabular_inlines_collapsed %} collapsible-tabular-inlines-collapsed {% endif %} +{% endif %} {% endblock %} {% block branding %} diff --git a/admin_interface/templates/admin_interface/collapsible-inlines.html b/admin_interface/templates/admin_interface/collapsible-inlines.html new file mode 100644 index 00000000..bba2dfa6 --- /dev/null +++ b/admin_interface/templates/admin_interface/collapsible-inlines.html @@ -0,0 +1,5 @@ +{% load static %} + +{% if theme.collapsible_stacked_inlines or theme.collapsible_tabular_inlines %} + +{% endif %} From 7a0e63e9863bf008ee5c227d23a542c3235161d2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 11 May 2023 01:38:14 +0200 Subject: [PATCH 082/232] Update `CHANGELOG` and version. --- CHANGELOG.md | 5 +++++ admin_interface/metadata.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f2c651..968db749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.26.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.26.0) - 2023-05-11 +- Add options for collapsible inlines. #263 (by [@fabiocaccamo](https://github.com/fabiocaccamo) in #282) +- Bump requirements. +- Bump `pre-commit` hooks. + ## [0.25.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.25.0) - 2023-04-18 - Add `Django 4.2` support. - Drop `Django 2.2` support. diff --git a/admin_interface/metadata.py b/admin_interface/metadata.py index 3a4f509e..c886796d 100644 --- a/admin_interface/metadata.py +++ b/admin_interface/metadata.py @@ -7,4 +7,4 @@ __email__ = "fabio.caccamo@gmail.com" __license__ = "MIT" __title__ = "django-admin-interface" -__version__ = "0.25.0" +__version__ = "0.26.0" From 7c4793c9b6cf25eb4f0ad2ea56ceea94143eba25 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 29 May 2023 13:13:28 +0200 Subject: [PATCH 083/232] Prevent multiple `.collapse-toggle` button. --- .../collapsible-inlines/collapsible-inlines.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js b/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js index 1f560f46..60c4d482 100644 --- a/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js +++ b/admin_interface/static/admin_interface/collapsible-inlines/collapsible-inlines.js @@ -20,7 +20,10 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined') var collapseToggleText = (fieldsetCollapsed ? gettext('Show') : gettext('Hide')); var collapseToggleHTML = ' (' + collapseToggleText + ')'; var headerEl = fieldsetEl.find('> h2,> h3'); - headerEl.append(collapseToggleHTML); + if (headerEl.find(".collapse-toggle").length === 0) { + // don't add collapse toggle button if already present + headerEl.append(collapseToggleHTML); + } } var stackedInlinesOptionSel = '.admin-interface.collapsible-stacked-inlines'; From f7be7cafb38418b616d83d20eb32a829e063239f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 23:17:26 +0200 Subject: [PATCH 084/232] Update tox requirement from ==4.5.* to ==4.6.* (#288) --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index de2d334c..8bb9429c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* pre-commit == 3.3.* psycopg2-binary == 2.9.* -tox == 4.5.* +tox == 4.6.* From fd908cbbed8c49febd070d89e0a47caadf2db271 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 23:17:40 +0200 Subject: [PATCH 085/232] Update pre-commit hooks. (#285) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a484172e..c4932bae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.6.0 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.265 + rev: v0.0.272 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 68d7094b3e8ce44bb7fa9d23868e09b0aa01667d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 09:41:47 +0200 Subject: [PATCH 086/232] Update pre-commit hooks. (#289) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4932bae..a974485d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: args: ["--py38-plus"] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.13.0 + rev: 1.14.0 hooks: - id: django-upgrade args: ["--target-version", "3.2"] From 8fbed58cd65d5298eeb2b2c998fc6b4b23a6c265 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 09:47:23 +0200 Subject: [PATCH 087/232] [pre-commit.ci] pre-commit autoupdate (#286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.4.0 → v3.6.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.6.0) - [github.com/charliermarsh/ruff-pre-commit: v0.0.265 → v0.0.272](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.265...v0.0.272) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From 7d3b967847af68d855cd141385fd2d8a29f35f12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Jun 2023 21:37:27 +0200 Subject: [PATCH 088/232] Bump django-colorfield from 0.8.0 to 0.9.0 (#290) Bumps [django-colorfield](https://github.com/fabiocaccamo/django-colorfield) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/fabiocaccamo/django-colorfield/releases) - [Changelog](https://github.com/fabiocaccamo/django-colorfield/blob/main/CHANGELOG.md) - [Commits](https://github.com/fabiocaccamo/django-colorfield/compare/0.8.0...0.9.0) --- updated-dependencies: - dependency-name: django-colorfield dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fb7bf112..6068995b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ django >= 2.2 -django-colorfield == 0.8.0 +django-colorfield == 0.9.0 python-slugify == 8.0.1 From d9107d819f39ee68ee1d2c0387be276012fd8dc3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 10:14:37 +0200 Subject: [PATCH 089/232] Update pre-commit hooks. (#292) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a974485d..061c45a3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.7.0 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.272 + rev: v0.0.273 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 39f47b29bc9ca5857b30ff3aae23fa9130d7e485 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 10:15:20 +0200 Subject: [PATCH 090/232] [pre-commit.ci] pre-commit autoupdate (#293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.6.0 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.6.0...v3.7.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From effc5fbd3587ff392d74bfbcbb6a1ecaaafc5cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D1=8F?= <124512007+rustzzdevel@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:40:21 +0300 Subject: [PATCH 091/232] Add russian translation. (#295) --- .../locale/ru/LC_MESSAGES/django.mo | Bin 0 -> 5920 bytes .../locale/ru/LC_MESSAGES/django.po | 320 ++++++++++++++++++ 2 files changed, 320 insertions(+) create mode 100644 admin_interface/locale/ru/LC_MESSAGES/django.mo create mode 100644 admin_interface/locale/ru/LC_MESSAGES/django.po diff --git a/admin_interface/locale/ru/LC_MESSAGES/django.mo b/admin_interface/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..1f77b53695bb7f794ed8679de1878617dfdeb1fa GIT binary patch literal 5920 zcmbW3TX0=f8OIklfp`N%sN!WIP#frJlQg9zZQABqGA3rU>CV~d-a9E} zaE7!ZVhd4bPzF!|ePHmVEeTE2Hg$aQ#ld}MoKXj5lqVk?ozW*RGy40ly-#vlLOa8r zv-W?l+xLCz|6SI3=ccQlGdw$KpP>z2X^aORyP6lz4IeUQH+UoXanJ*`?f}ToJj3h5 z;B(-O;49$Az&8r~1$Zs}D)>q8_n_AQy%_%w$j@BGqK|?N1+D@$z8d6bO1y3WH-dMA zy`bbA0A=boKz-z#_LFxH((f%>!9`@0B-}Qz`MX_i~fAk{|zYp{{~TE%=I~5SKtkx_*@0b z?z=&qXEP{2^cC|DferNc7xPo#C+I&3%8nO{`IkX{=4ZwD9Jq=80w{U^0HyCrgsFcs zD7|-rlHbBh_O^rKr3;kZdqAD@E8rbq3jXQ}W1a^erSG$NBlss!Jl%p&oudi76YKz2 zgCpPu~bj;BBDn=mn*BA9yQx5Ja_^0TpjAfS&`8gA?Gd zLFwIra6XL>-VUbV=fUrTviHqm{I8&R`WQxQT`!2s%vga3K-u*uDE~hVO8%=LKl4jo z7W^I92L20d0$U-w8}vc-Uk4S3Z-cGiyWp3>TM@nk3_$f?2c`eNAfn7QI9u^}3s?e6 zpyYiGRNNf{#otL#cKrbq-&bI)_*nz42e*OuffZ1^yasCjsRI89O5as%l3#BI#m5Y& zbtk|tg1;^L{{#7%yD$z@%@$DS-vvtkQ(zzXJlGDt3tj=D#>Jg%(tgd!Ug@fTN zTAKX5gXZ!GR2*%i=~+cnd~T=VN*5!tM={Y%yNA|FL%pjfp9aO>I+~tdn&M1n+)1lF zib0*Xvo=uRRp3_Iy)>wHkNl+=+K_kMTO8CL#hrZARSZ~Au~B;n1?OAw*Fw9VrW&kA zKJB4xREOtk+7|bf`}0b^uPOS1&BgZ`Q2D4waVOs@@64LmFSpq{dN#FoZRlESqu8sA z`Wm=*Q%_6FT6@S3!{{Ibz0F;%O}%UFXzcqH`Yko>ICx4FBs(R7r@ zgNp5|q<%c&4g01u_Pz3OJUKp;*!6ZGDo=*K9b?Ro6Vo*&Z3WogC>}Rmq3^}k3qv~+ zga}DYw?E=dhN<1>hyHL%H}q5Ac21^gRMD)u+fDbwh>ENy^+A%xUK&Id(^HuW;;1t2 zS5njKO$Eb@^*Xsm+H6-;N#iI?%uc`J$HB1e4=Vc;bHB6C^i{&3;wPpb(Uab&Z->XC zDDh*{?|V}|C-*A*Z5r9h#JA~~Z_9nFzf@W~2y;k-!hjiJvCcODsYXGZKYmj}usLVj?kP!RS~>OKrhmp?qmM zk+Q#-lTuWpp7^yX>k)rCT%*|&M-P+T zrM`0ML98U!+w7i>t}k`$?6D8_?A_P5dso9=edwcfn+s4v7;Y)+QH{NFZJ9h1SK$dLn@81yy>!Nscc?}i}^bPbZ zo87#wsX=vxv@H!Dn!p}WxSnteDqAQaUQC>|KQP!^+Pu6@W{vo9si#81kos+Q^H7jB z>lT}Twy&w&)!fwH-fUN|w)$+ky}h~FZnsUA<@C3;x74P# zwzulj?P%KC++rVlEZ?%NxwVlk&Bd1X_9jiab=%rEE^oiDacLa6sHy4P+Kz;Bh zs|l;!JjkC%)V$M>-#;dMo@Ix#x$5K9Z?ffdb=snDHanXytxhBU@ob*9n4NT%%vWbj z_8On(vxRKlvT`w-tsZe2PfOk@hEUF?!_{LZdlpHv7U??5+3HbCzqTY_hP)qDpJYAC z@?Dm*PG@u4HJ_cS9+MH(qsZc@CnU(CebJ&-+Rw0A9L-msG1&`zEEcvgKg*2cf?4$Z zq!@6vZ8zC>FMU)@$nPdBl#dW7M~K5Y9d!X!=Xf7?q;bAE`H;cWwqR~iB$@1|%jb|0 z=UI9jJ`2n8lRADFhI*+xQGH5kBxssrpUDN)h(BH??Fq+`kv4KaUqt*t)E;3BH=(#izmJ&wqn+=3rnRLId53m3CDa1K7q&M)y+xLCIm3r+nb*kOY|ea?sSRGTlmK#@aX zaGE5_aV4k0zGfDQIf9(jBp+Oa!I((;K)RgkB@b!Juflc9EJGYFLb#%4N#BB7TofuP zUy2D)uI!yPPU@+=tT=K=IaRa8BGtuL9zYPN*ib^t>8QyMC|2{BB40TwF|m>WHlA_k zSJ`v|sJdu8f*X%sR-$yDK)}2h{U9b?PQVH#6)}=C#WjJsF7J&3kk1p2ySj=v?>H?g z;z_I1vSh`gIA`#Uj#R7WoQ-57Q~5bhiu5JURNLUJMq$B#3&A>HxlB@Vnl1R{R&ma8 z1*$FwSb_n|rPJMH6q9VBUa9l+QlebA-BtMI!n~AE`2RAam&lwIrC<^M&bfa7=)a)) z8do|OAfc{^5~DLt7Q^x%DWd|r(yHpWi8HcWF3SCMN;J}S7a#Y7%V@$up`I7S8C4^K zX!-cH3h9(A6(8#3#TUR*=usArSjB{kBNaUY;=EI=zciGVS`r_j1mw485eoS~s2P)A zXWFU16wdkNqbi4TTm!lX-?NH%kfyxaE=Tlx);SKvUhN8Z(rPinxQf2JVsl$BD&X&X zdCJ8)C|tVRi9cy#CBHP?#lBSDSjqpa3%a;ff2(SLM>xtQGH>3l!SU37G10h!B)p&h RyPK, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-06-23 16:28-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: admin_interface/admin.py +msgid "Environment" +msgstr "Окружение" + +#: admin_interface/admin.py +msgid "Language chooser" +msgstr "Вид выбора языка" + +#: admin_interface/admin.py +msgid "Logo" +msgstr "Логотип" + +#: admin_interface/admin.py +msgid "Favicon" +msgstr "Иконка адресной строки" + +#: admin_interface/admin.py +msgid "Title" +msgstr "Заголовок" + +#: admin_interface/admin.py +msgid "Header" +msgstr "Шапка" + +#: admin_interface/admin.py +msgid "Breadcrumbs / Module headers" +msgstr "Шапки модулей" + +#: admin_interface/admin.py +msgid "Generic Links" +msgstr "Общие ссылки" + +#: admin_interface/admin.py +msgid "Save Buttons" +msgstr "Кнопки сохранения" + +#: admin_interface/admin.py +msgid "Delete Buttons" +msgstr "Кнопки удаления" + +#: admin_interface/admin.py +msgid "Navigation Bar" +msgstr "Строка навигации" + +#: admin_interface/admin.py +msgid "Related Modal" +msgstr "Модаль для связанных объектов" + +#: admin_interface/admin.py +msgid "Form Controls" +msgstr "Управление формами" + +#: admin_interface/admin.py +msgid "List Filter" +msgstr "Вид списка фильтров" + +#: admin_interface/admin.py +msgid "Change Form" +msgstr "Вид формы изменения" + +#: admin_interface/admin.py +msgid "Inlines" +msgstr "Вид вставок" + +#: admin_interface/admin.py +msgid "Recent Actions" +msgstr "Недавние действия" + +#: admin_interface/apps.py +msgid "Admin Interface" +msgstr "Интерфейс администрирования" + +#: admin_interface/models.py +msgid "name" +msgstr "название" + +#: admin_interface/models.py +msgid "active" +msgstr "активный" + +#: admin_interface/models.py admin_interface/templates/admin/base_site.html +msgid "Django administration" +msgstr "Администрирование Django" + +#: admin_interface/models.py +msgid "title" +msgstr "заголовок" + +#: admin_interface/models.py +msgid "color" +msgstr "цвет" + +#: admin_interface/models.py +msgid "visible" +msgstr "видимый" + +#: admin_interface/models.py +msgid "Leave blank to use the default Django logo" +msgstr "Оставьте пустым, чтобы по умолчанию использовать логотип Django" + +#: admin_interface/models.py +msgid "logo" +msgstr "логотип" + +#: admin_interface/models.py +msgid "max width" +msgstr "максимальная ширина" + +#: admin_interface/models.py +msgid "max height" +msgstr "максимальная высота" + +#: admin_interface/models.py +msgid "(.ico|.png|.gif - 16x16|32x32 px)" +msgstr "" + +#: admin_interface/models.py +msgid "favicon" +msgstr "иконка в адресной строке" + +#: admin_interface/models.py +msgid "" +"(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: " +"#3498DB)" +msgstr "" +"(красный: #E74C3C, оранжевый: #E67E22, желтый: #F1C40F, зеленый: #2ECC71, " +"синий: #3498DB" + +#: admin_interface/models.py +msgid "visible in header (marker and name)" +msgstr "видимый в шапке (метка и название)" + +#: admin_interface/models.py +msgid "visible in favicon (marker)" +msgstr "видимый в иконке адресной строки (метка)" + +#: admin_interface/models.py +msgid "Default Select" +msgstr "Выбор по умолчанию" + +#: admin_interface/models.py +msgid "Minimal Select" +msgstr "Минимальный выбор" + +#: admin_interface/models.py +msgid "control" +msgstr "контроль" + +#: admin_interface/models.py +msgid "code" +msgstr "код" + +#: admin_interface/models.py +msgid "display" +msgstr "отображение" + +#: admin_interface/models.py +msgid "background color" +msgstr "цвет заднего фона" + +#: admin_interface/models.py +msgid "text color" +msgstr "цвет текста" + +#: admin_interface/models.py +msgid "link color" +msgstr "цвет ссылки" + +#: admin_interface/models.py +msgid "link hover color" +msgstr "цвет ссылки при наведении" + +#: admin_interface/models.py +msgid "background selected color" +msgstr "цвет заднего фона выбранного объекта" + +#: admin_interface/models.py +msgid "link selected color" +msgstr "цвет ссылки выбранного объекта" + +#: admin_interface/models.py +msgid "rounded corners" +msgstr "закругленные края" + +#: admin_interface/models.py +msgid "link active color" +msgstr "цвет активной ссылки" + +#: admin_interface/models.py +msgid "background hover color" +msgstr "цвет заднего фона при наведении" + +#: admin_interface/models.py +msgid "background opacity" +msgstr "прозрачность заднего фона" + +#: admin_interface/models.py +msgid "close button visible" +msgstr "видимость кнопки закрытия" + +#: admin_interface/models.py +msgid "highlight active" +msgstr "подсвечивать активное" + +#: admin_interface/models.py +msgid "use dropdown" +msgstr "использовать выпадающий список" + +#: admin_interface/models.py +msgid "sticky position" +msgstr "устойчивое положение" + +#: admin_interface/models.py +msgid "quick remove links for active filters at top of sidebar" +msgstr "быстро удалять ссылки для активных фильтров сверху боковой панели" + +#: admin_interface/models.py +msgid "foldable apps" +msgstr "складные приложения" + +#: admin_interface/models.py +msgid "fieldsets as tabs" +msgstr "набор полей в виде вкладок" + +#: admin_interface/models.py +msgid "inlines as tabs" +msgstr "вставки как вкладки" + +#: admin_interface/models.py +msgid "collapsible stacked inlines" +msgstr "разборные уложенные вставки" + +#: admin_interface/models.py +msgid "collapsible stacked inlines collapsed" +msgstr "сворачивающиеся уложенные вкладки свернуты" + +#: admin_interface/models.py +msgid "collapsible tabular inlines" +msgstr "сворачивающиеся табличные вставки" + +#: admin_interface/models.py +msgid "collapsible tabular inlines collapsed" +msgstr "сворачивающиеся табличные вставки свернуты" + +#: admin_interface/models.py +msgid "sticky submit" +msgstr "устойчивая отправка" + +#: admin_interface/models.py +msgid "sticky pagination" +msgstr "устойчивая разбивка" + +#: admin_interface/models.py +msgid "Theme" +msgstr "Тема" + +#: admin_interface/models.py +msgid "Themes" +msgstr "Темы" + +#: admin_interface/templates/admin/change_list.html +msgid "Filter" +msgstr "Фильтр" + +#. Translators: don't translate this, the django catalog already contains it +#: admin_interface/templates/admin/change_list.html +msgid "Clear all filters" +msgstr "Очистить все фильтры" + +#: admin_interface/templates/admin/edit_inline/headerless_stacked.html +#: admin_interface/templates/admin/edit_inline/headerless_tabular.html +msgid "Change" +msgstr "Изменить" + +#: admin_interface/templates/admin/edit_inline/headerless_stacked.html +#: admin_interface/templates/admin/edit_inline/headerless_tabular.html +msgid "View" +msgstr "Посмотреть" + +#: admin_interface/templates/admin/edit_inline/headerless_stacked.html +#: admin_interface/templates/admin/edit_inline/headerless_tabular.html +msgid "View on site" +msgstr "Посмотреть на сайте" + +#: admin_interface/templates/admin/edit_inline/headerless_tabular.html +msgid "Delete?" +msgstr "Удалить?" + +#: admin_interface/templates/admin/filter.html +#: admin_interface/templates/admin_interface/dropdown_filter.html +#, fuzzy, python-format +#| msgid " By %(filter_title)s " +msgid " By %(filter_title)s " +msgstr " По %(filter_title)ы " + +#: admin_interface/templates/admin/popup_response.html +msgid "Popup closing..." +msgstr "Закрытие всплывающего окна..." From 27b57dd2b26c1729deadbf27885c683e774bea16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 21:42:25 +0200 Subject: [PATCH 092/232] Update pre-commit hooks. (#294) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 061c45a3..0477579f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.2"] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.273 + rev: v0.0.275 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 5707ebfe09eaa08567ad53a08502dd01a44b0d42 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 21:42:45 +0200 Subject: [PATCH 093/232] [pre-commit.ci] pre-commit autoupdate (#296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.273 → v0.0.275](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.273...v0.0.275) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From d269de0b63f60403bb4f98970ba72a4fa3fd7905 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 26 Jun 2023 21:45:36 +0200 Subject: [PATCH 094/232] Add Russian language to tests. --- tests/settings.py | 1 + tests/test_templatetags.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/tests/settings.py b/tests/settings.py index 9b57d540..14b3c7bd 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -105,6 +105,7 @@ ("it", "Italiano"), ("pl", "Polski"), ("pt-BR", "Português"), + ("ru", "Русский"), ("tr", "Türk"), ) LANGUAGE_CODE = "en" diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 4b123a32..8de4b88b 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -82,6 +82,13 @@ def test_get_admin_interface_languages(self): "active": False, "activation_url": "/i18n/setlang/?next=/pt-br/admin/", }, + { + "code": "ru", + "name": "Русский", + "default": False, + "active": False, + "activation_url": "/i18n/setlang/?next=/ru/admin/", + }, { "code": "tr", "name": "Türk", From 60501026a66ea5046507526ecf9375a91744510a Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 28 Jun 2023 08:22:09 +0200 Subject: [PATCH 095/232] Update Django version specifier in "test-package" workflow. --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 43c03a8e..6ce33212 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -95,7 +95,7 @@ jobs: - name: Install django run: | - pip install "Django ~= ${{ matrix.django-version }}" + pip install "Django == ${{ matrix.django-version }}.*" - name: Install requirements run: | From 5541d4ca707845df7140f9bdeac603658ee2c679 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 4 Jul 2023 00:07:52 +0200 Subject: [PATCH 096/232] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0477579f..ff560a4d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: rev: 1.14.0 hooks: - id: django-upgrade - args: ["--target-version", "3.2"] + args: ["--target-version", "3.0"] - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.0.275 From 2b1291043585ba03271b3cb5f8355c9408ef5c9e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 09:38:13 +0200 Subject: [PATCH 097/232] [pre-commit.ci] pre-commit autoupdate (#300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.7.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.9.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.275 → v0.0.278](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.275...v0.0.278) - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff560a4d..549e8419 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.9.0 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -14,8 +14,8 @@ repos: - id: django-upgrade args: ["--target-version", "3.0"] - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.275 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.278 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -27,7 +27,7 @@ repos: args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black From 0e128f97eeb9f1a520dafea38a732af726dbdc01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:04:44 +0200 Subject: [PATCH 098/232] Update pre-commit hooks. (#299) Co-authored-by: fabiocaccamo Co-authored-by: Fabio Caccamo From 13c43f36df5ccc6e13b6565600322a801089dd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Mu=C3=B1oz?= <75496256+smunoz-ml@users.noreply.github.com> Date: Sat, 5 Aug 2023 04:23:19 -0300 Subject: [PATCH 099/232] Updated Spanish translations (#307) --- .../locale/es/LC_MESSAGES/django.mo | Bin 2359 -> 4072 bytes .../locale/es/LC_MESSAGES/django.po | 65 +++++++++--------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/admin_interface/locale/es/LC_MESSAGES/django.mo b/admin_interface/locale/es/LC_MESSAGES/django.mo index 15f9df16f3b417ea47eb8a9f956eb779856e1133..289e0d60498045c87291364ef43c7548a31366fb 100644 GIT binary patch literal 4072 zcmaKuO^h5z8HOuhVzMLwOl*Eal1fPMu1Syg$2QB_8{)NhiN$VM*&7gtVAXWj%#^pg zs?*i8*)bLekO&;OM9L)+kq{j4A&8I*h)d8SA#z1R2qXj?av_%pOUP0rc;D)pAFrdd zrskQduKMb$ufBR~{(k7dO9IcAQ9g@u-v@;FCV2M&eBmiSB*bCxIq+fd1@NQbb&&mk z1AYYjGk7ofugG^mjuUq_?~i~7QGEow2Rs(J2;w8w@bxip13U(P3#8p2f^_92koI4W zybiMeuVej>AnpDIyc>KAgbU(7AU@(|tkVhB?*uvi9`FeGAb1Eo3El@j1#;eJ!TZ5B z_!#(|SpQk9zX5Wdw?KTv+mSaS-vvL8_5&Yo{5t}2-bX>k@g&IitKby)jrhI|a(*A% zcfq?*|6XkW5%@*aUj%9AO^|l}8tZR^jK{km?M`7Z{X7gZKKFz4cN*mSX2H*a>!7;> z`wlWL|G?lS@V_AY&0|v-ho?cts|MNc1(5T<0)86&C5WlTn;_@;6Zk3cZy?9r0O{93 zIKy}!0=b@}AmeixEE7wi87Iqn9?_1*+I|NlVl`#}VS zd2}yGzaIeU_X&{xt%2-+8T<^`1-ahuf?WU4!Ow%g2WkJ`Ap5@)c{B13Ov3!X3*FuF`tj{pe-V_ZzYIPO{uacxj~@DtkcBm}@eIG>!+qj&3}qRGe$jVo$Rj9E zpqxNyp?m>_@#Dk%Ivsuq@j(zN5ORx6kD@RiAV0x>#$fnx{R=3}Cq8ox#9}1lz_s&v zuz@%VegcIW^#BUBix2k@sV$D9%%Ct=`C$2C9%YslJd7zH#*p!2j-5oAMwxsVJLbuk zV&kbu2`2G3^OiZo_zSr*kdIAwOkV5ia&78d&v+@OTPAhaTBYq?YjsUWCUWl7?%b(s z3-h}R^RnEX5ofc)Sb4!>SVyH=tW;WMY1J>sF;uATMb{1xrgFB>wiat@2fkTBWAdD{ zb>(s|zM`$JOe)un-S*B@d7)7*JuyRBABT+}JNm1k2fz@wV0 zT4xN5%EcwRFRfY!XYs>(zjLnVJ{{7x@Dvs0HExl^h?&qp{PYe6r-D&}= z!7g(1L}q-MtAXgmo$VN%XI|G{DlcKgi;l}Pg%wCumR|Hsx0j>TGR7&oKkAOfY{z$; z6jOzkiJz0v3)@|&U1Teb3jTcFWOYwig^hWxZ_;g9=>h?lwBu#RRYUX5!GWhW5~`H0 zBfZIV8yOMy4Y5sKh1B%I*RV5?rRo~nWc9EGITNxx)_uQSm|E0&w~pS2V=0)eS>?*i zJ#WQuOCu3~8N(;13sr6FYG&An@0x=+d?gh!ii?{Oo0YqQW0+jXlCQ%{>!*@-Vtn|A+*>X#AYV&K!MNK!HP0l07m*o8H{6aFjn9QD#b8|~4 z=abom+1aUelgz~yJQ){@0>KRVyhRkCVvl5ozK@Q=56eQh7o_@=MZ| zq3W0CPs`@#^0bu?FUz@^(^EojB6n`rTaHCkyo9tpE+MWnvOec7ljT1qfgAIvI zr$8b}oLF%XX&sztyQ)H#hif1Rb<-P8G%702!YHDvM}i%-ItIUZgD z(dE%4kgB3Y>~Q=MZ;f5sdkyhXWp2_C%v)y6*dfJ&!-X(j-oDYJaO#k8a=N)cX2yYS zUhJ=rA|0*@mDf1$ve^5{E;B`0{JV%XC#);ll@`r)!3=FuJLG4~x#*;4`sRwMg8x6h zU*i8uv)O3G1%fH~mjTKmw8tf6aT!)RLn1H^Hs!6`TqaF&4x4bB+|n@4fnmOl!a&J$ wqnvw&$0v^m1UGV%5W`z!NP3MkHhI~k$cTySrs<$ZViRti&_@nr6Q3FJfBn@UQUCw| delta 1139 zcmY+?Pe>F|90%~XrQ7bhrfsH{m18ABvAUaDDwb|3cF>6a*dYtv&OT#w_KnWWN_KD| z=+IH7Iz)Bo5OnYqQP3qQx(MB(TLnP~5)pJ1>ib=%LqF!tXCAyizxSKB*7`D4{+z11 zClKvud(lQBLi9p=3touftwQXAIoJj-!#cPKIsOjZ4xd7fdjV_UD%=J?!CLqQM&S>5 z82*MBR~D^RLf{cc@T!Ly$OUtd6VJgUyaub`EaXD-VgE+hUxJ)}8#coGFa=j2=e>bU z=sny4Kfna`7hmzgiR%!L*a(ea7Ec<53D^j^P#a!Mr~`7r9yo`p4MJ|bg6sz1JJHfV2OmNv_z^O}?_qx(a{LBtg>|vbei!7p zQxG|cF^C~z0NuVE8hh1}p9CI#kd1&$zDi+h@qu@x-V$WnSHs z1xJji8R;5I8+lu5(=q0xD~*yTRWOu17CcJML~=o__GGR3-+`vKk2Rllig{NF<;|BY YEj`0k1xFX87npTju}RCb^0pFx0RT^&, 2018 +# Santiago Muñoz , 2023 # #, fuzzy msgid "" @@ -10,8 +11,8 @@ msgstr "" "Project-Id-Version: django-admin-interface\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-10 18:20-0500\n" -"PO-Revision-Date: 2018-12-30 19:13-0500\n" -"Last-Translator: Martin Vuelta \n" +"PO-Revision-Date: 2023-08-04 11:52-0300\n" +"Last-Translator: Santiago Muñoz \n" "Language-Team: Spanish \n" "Language: Spanish \n" "MIME-Version: 1.0\n" @@ -25,7 +26,7 @@ msgstr "Ambiente" #: admin_interface/admin.py msgid "Language chooser" -msgstr "" +msgstr "Selección de idioma" #: admin_interface/admin.py msgid "Logo" @@ -61,7 +62,7 @@ msgstr "Botones de borrar" #: admin_interface/admin.py msgid "Navigation Bar" -msgstr "" +msgstr "Barra de navegación" #: admin_interface/admin.py msgid "Related Modal" @@ -69,7 +70,7 @@ msgstr "Modal para objetos relacionados" #: admin_interface/admin.py msgid "Form Controls" -msgstr "" +msgstr "Controles del formulario" #: admin_interface/admin.py msgid "List Filter" @@ -77,7 +78,7 @@ msgstr "Lista de filtros" #: admin_interface/admin.py msgid "Change Form" -msgstr "" +msgstr "Cambiar Formulario" #: admin_interface/admin.py msgid "Inlines" @@ -93,11 +94,11 @@ msgstr "Interfaz de administración" #: admin_interface/models.py msgid "name" -msgstr "Nombre" +msgstr "nombre" #: admin_interface/models.py msgid "active" -msgstr "Activo" +msgstr "activo" #: admin_interface/models.py admin_interface/templates/admin/base_site.html msgid "Django administration" @@ -113,11 +114,11 @@ msgstr "color" #: admin_interface/models.py msgid "visible" -msgstr "Visible" +msgstr "visible" #: admin_interface/models.py msgid "Leave blank to use the default Django logo" -msgstr "Dejar en blanco para usaer el logo por defecto de Django" +msgstr "Dejar en blanco para usar el logo por defecto de Django" #: admin_interface/models.py msgid "logo" @@ -125,11 +126,11 @@ msgstr "logo" #: admin_interface/models.py msgid "max width" -msgstr "" +msgstr "ancho máximo" #: admin_interface/models.py msgid "max height" -msgstr "" +msgstr "altura máxima" #: admin_interface/models.py msgid "(.ico|.png|.gif - 16x16|32x32 px)" @@ -147,31 +148,31 @@ msgstr "" #: admin_interface/models.py msgid "visible in header (marker and name)" -msgstr "" +msgstr "visible en el encabezado (marcador y nombre)" #: admin_interface/models.py msgid "visible in favicon (marker)" -msgstr "" +msgstr "visible en el favicon (marcador)" #: admin_interface/models.py msgid "Default Select" -msgstr "" +msgstr "Selección por defecto" #: admin_interface/models.py msgid "Minimal Select" -msgstr "" +msgstr "Selección mínima" #: admin_interface/models.py msgid "control" -msgstr "" +msgstr "control" #: admin_interface/models.py msgid "code" -msgstr "" +msgstr "código" #: admin_interface/models.py msgid "display" -msgstr "" +msgstr "mostrar" #: admin_interface/models.py msgid "background color" @@ -219,11 +220,11 @@ msgstr "opacidad de fondo" #: admin_interface/models.py msgid "close button visible" -msgstr "" +msgstr "mostrar botón de cerrar" #: admin_interface/models.py msgid "highlight active" -msgstr "" +msgstr "destacar activo" #: admin_interface/models.py msgid "use dropdown" @@ -231,47 +232,47 @@ msgstr "Usar lista desplegable" #: admin_interface/models.py msgid "sticky position" -msgstr "" +msgstr "anclar posición" #: admin_interface/models.py msgid "quick remove links for active filters at top of sidebar" -msgstr "" +msgstr "remover enlaces para filtros activos en la parte superior de la barra lateral" #: admin_interface/models.py msgid "foldable apps" -msgstr "" +msgstr "aplicaciones plegables" #: admin_interface/models.py msgid "fieldsets as tabs" -msgstr "" +msgstr "campos como pestañas" #: admin_interface/models.py msgid "inlines as tabs" -msgstr "" +msgstr "inlines como pestañas" #: admin_interface/models.py msgid "collapsible stacked inlines" -msgstr "" +msgstr "inlines apilados plegables" #: admin_interface/models.py msgid "collapsible stacked inlines collapsed" -msgstr "" +msgstr "inlines apilados plegables colapsados" #: admin_interface/models.py msgid "collapsible tabular inlines" -msgstr "" +msgstr "inlines tabulares plegables" #: admin_interface/models.py msgid "collapsible tabular inlines collapsed" -msgstr "" +msgstr "inlines tabulares plegables colapsados" #: admin_interface/models.py msgid "sticky submit" -msgstr "" +msgstr "anclar botón de guardar" #: admin_interface/models.py msgid "sticky pagination" -msgstr "" +msgstr "anclar paginación" #: admin_interface/models.py msgid "Theme" From 24a5e1f995b9e47aaac8906cdcb7f149963dcc3d Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 31 Aug 2023 16:00:23 +0200 Subject: [PATCH 100/232] Fix logout and theme buttons style. #246 --- .../admin_interface/css/admin-interface.css | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/admin_interface/static/admin_interface/css/admin-interface.css b/admin_interface/static/admin_interface/css/admin-interface.css index bfa9ba40..31b3a17b 100644 --- a/admin_interface/static/admin_interface/css/admin-interface.css +++ b/admin_interface/static/admin_interface/css/admin-interface.css @@ -131,16 +131,30 @@ max-height: var(--admin-interface-logo-max-height); } -.admin-interface #header #user-tools a { +.admin-interface #header #user-tools a, +.admin-interface #header #user-tools #logout-form button { color: var(--admin-interface-header-link-color); } .admin-interface #header #user-tools a:hover, -.admin-interface #header #user-tools a:active { +.admin-interface #header #user-tools a:active, +.admin-interface #header #user-tools #logout-form button:hover, +.admin-interface #header #user-tools #logout-form button:active { color: var(--admin-interface-header-link-hover-color); border-bottom-color: rgba(255, 255, 255, 0.5); } +.admin-interface #header #user-tools button.theme-toggle svg { + color: transparent; + fill: var(--admin-interface-header-link-color); +} + +.admin-interface #header #user-tools button.theme-toggle:hover svg, +.admin-interface #header #user-tools button.theme-toggle:active svg { + color: transparent; + fill: var(--admin-interface-header-link-hover-color); +} + .admin-interface #nav-sidebar .current-app .section:link, .admin-interface #nav-sidebar .current-app .section:visited { color: var(--admin-interface-module-link-selected-color); From 540f33fddead4902790e6da1361d90a6510d12d3 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 31 Aug 2023 16:11:57 +0200 Subject: [PATCH 101/232] Update Italian translations. --- .../locale/it/LC_MESSAGES/django.mo | Bin 2871 -> 3504 bytes .../locale/it/LC_MESSAGES/django.po | 22 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/admin_interface/locale/it/LC_MESSAGES/django.mo b/admin_interface/locale/it/LC_MESSAGES/django.mo index 034fc9049f2f6a6b0ae06cc7f804deeb052da493..a75aa70a61141692c635328695a5658edf3163b8 100644 GIT binary patch delta 1703 zcmY+EO>9*~6vxNXLJPFk@?jCGgNhkZ|2;YGw1wg z-aEVc^xF21BfW1L+E#2G_T4qc?1b}+c+pPx8nX&6!1eG8xCdT^*TRSUI_q}A#f&H6 zG8n__;BhzvPr@beZK!ysAoJShlj_6gaF7pQRlEWf@K-nt|A3pIoZ4UUT9R1ZfghNt$ zsES%pmA_p1-+)^99#kUdD*tCtiGN%9e}PXjzFPUmkwb|*4z!Il8iGd=I7#6vSdmQcW^4wfrUMuBeS;cVL^a`!Pwr8PlCvkEtnnHL0rBR<*a4 z-Oi=Bi~gOMfY$GsY!Abr;4Sf+I`p<)`Q)xsa(dg z>6~PxUlHcM<*ICnewIsyCcnFGZA^0SrtvpYY?r>W%-#b326?P&`@+^&-#mBw1q22Cim~weY6T97I#c1E2;e)}?8oeye zX2=WQ_x`@v9kUG|rW(0XcQ(}XhDluP&5>59P20@J=}~W^kW4r2WJ*T0Jm9F3vM#rI zI%CsGBG&z3mwhz6_-xPqXVQ9@3^ixU%<93$UB`q=YCejb&8Z{UP)5pv+1rYmF2OV7 zGwY)ehs0&xJl*YWD}LzTJW|yd1zYzlrR<`A;K)i!%$#MLPT6ym?TcdrVeDXNwp88b(6G7KWti4V{1+QZkkgNK|BaWD57XZPaecn78^)5rA-flxHlC< zJS=+fRzy@vQS=Z*@S>uH9`w+IrB=L%A2$z04}$+ES;1jvezVE!%scPwKJKrl{k4>H z%P4v30QFMD>>#eT&`{oPFx!NSIE0_@1V$XQET2){6DKmNf}xUbc05U=4jypJ091~a&ZT=t7b3q;zQ8EQkOv_9;?K`dYa zl}Q&Bcny8+@M8GKbq2bH4dsDbZ7mr)b1gnmY49?iAq|^x7&U%0^av_b zUWD#GRPpg(AU?qIGmE z3UE7BnaJq;wNp)|vW2P#^)+bXy;OY&dNKQ`|B8Z8(Rprd^qOZnOkaVh=xZSk8=-15 z+JMTQCPuPs;24c|{D09~x{I2lDqT9m-BcC5589#9r>{YUFS2oL7A!c=IuE;Lx8`O? zXKS^pHxtZ7M}n2;L~t~AJeZH&bG%~3eL5Gfx1`5s%QHoVJP Y^1=7SR8UP$2J6Ws$E#M{AlGr_FINR-s{jB1 diff --git a/admin_interface/locale/it/LC_MESSAGES/django.po b/admin_interface/locale/it/LC_MESSAGES/django.po index 458c1b9c..580ab43d 100644 --- a/admin_interface/locale/it/LC_MESSAGES/django.po +++ b/admin_interface/locale/it/LC_MESSAGES/django.po @@ -61,7 +61,7 @@ msgstr "Pulsanti per eliminare" #: admin_interface/admin.py msgid "Navigation Bar" -msgstr "" +msgstr "Barra di Navigazione" #: admin_interface/admin.py msgid "Related Modal" @@ -69,7 +69,7 @@ msgstr "Modale per gli oggetti correlati" #: admin_interface/admin.py msgid "Form Controls" -msgstr "" +msgstr "Controlli dei form" #: admin_interface/admin.py msgid "List Filter" @@ -77,7 +77,7 @@ msgstr "Filtro listato" #: admin_interface/admin.py msgid "Change Form" -msgstr "" +msgstr "Form di modifica" #: admin_interface/admin.py msgid "Inlines" @@ -125,11 +125,11 @@ msgstr "logo" #: admin_interface/models.py msgid "max width" -msgstr "" +msgstr "larghezza massima" #: admin_interface/models.py msgid "max height" -msgstr "" +msgstr "altezza massima" #: admin_interface/models.py msgid "(.ico|.png|.gif - 16x16|32x32 px)" @@ -237,7 +237,7 @@ msgstr "" #: admin_interface/models.py msgid "quick remove links for active filters at top of sidebar" -msgstr "" +msgstr "links di rimozione rapida dei filtri attivi in alto nella sidebar" #: admin_interface/models.py msgid "foldable apps" @@ -292,26 +292,26 @@ msgstr "Filtro listato" #. Translators: don't translate this, the django catalog already contains it #: admin_interface/templates/admin/change_list.html msgid "Clear all filters" -msgstr "" +msgstr "Cancella tutti i filtri" #: admin_interface/templates/admin/edit_inline/headerless_stacked.html #: admin_interface/templates/admin/edit_inline/headerless_tabular.html msgid "Change" -msgstr "" +msgstr "Modifica" #: admin_interface/templates/admin/edit_inline/headerless_stacked.html #: admin_interface/templates/admin/edit_inline/headerless_tabular.html msgid "View" -msgstr "" +msgstr "Visualizza" #: admin_interface/templates/admin/edit_inline/headerless_stacked.html #: admin_interface/templates/admin/edit_inline/headerless_tabular.html msgid "View on site" -msgstr "" +msgstr "Visualizza sul sito" #: admin_interface/templates/admin/edit_inline/headerless_tabular.html msgid "Delete?" -msgstr "" +msgstr "Eliminare?" #: admin_interface/templates/admin/filter.html #: admin_interface/templates/admin_interface/dropdown_filter.html From 17deb9b0f7d1d6f48cc4b9119a82592e3ad77209 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Sep 2023 18:20:27 +0200 Subject: [PATCH 102/232] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09d145bd..2caea03d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![](https://img.shields.io/pypi/djversions/django-admin-interface?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/) [![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-admin-interface/) -[![](https://pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface) +[![](https://static.pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface) [![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github)](https://github.com/fabiocaccamo/django-admin-interface/stargazers) [![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/main/LICENSE.txt) From f8d1660218031caedafda36ff3f5c28446d499d7 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Sep 2023 18:22:20 +0200 Subject: [PATCH 103/232] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6068995b..2928c2c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ django >= 2.2 -django-colorfield == 0.9.0 +django-colorfield == 0.10.1 python-slugify == 8.0.1 From a7aeb8223a46d0c2737a0bbfee279df09268e67e Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Sep 2023 18:27:59 +0200 Subject: [PATCH 104/232] Update `CHANGELOG` and version. --- CHANGELOG.md | 7 +++++++ admin_interface/metadata.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 968db749..8aacf1aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.26.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.26.1) - 2023-09-05 +- Fix logout and theme buttons style. #246 +- Add Russian translation. (by [@rustzzdevel](https://github.com/rustzzdevel) in #295) +- Update Italian translations. +- Update Spanish translations. (by [@smunoz-ml](https://github.com/smunoz-ml) in #307) +- Prevent multiple `.collapse-toggle` button. + ## [0.26.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.26.0) - 2023-05-11 - Add options for collapsible inlines. #263 (by [@fabiocaccamo](https://github.com/fabiocaccamo) in #282) - Bump requirements. diff --git a/admin_interface/metadata.py b/admin_interface/metadata.py index c886796d..39cb9c72 100644 --- a/admin_interface/metadata.py +++ b/admin_interface/metadata.py @@ -7,4 +7,4 @@ __email__ = "fabio.caccamo@gmail.com" __license__ = "MIT" __title__ = "django-admin-interface" -__version__ = "0.26.0" +__version__ = "0.26.1" From e0c0460e5928e18be75cb4cf75edadadb186f269 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:44:13 +0200 Subject: [PATCH 105/232] Update pre-commit hooks. (#302) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 549e8419..8e473576 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,19 +3,19 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.10.1 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.14.0 + rev: 1.14.1 hooks: - id: django-upgrade args: ["--target-version", "3.0"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.278 + rev: v0.0.287 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 8eef625219f74c85dff4a91879bf8cdd1c3e88ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:44:28 +0200 Subject: [PATCH 106/232] Update tox requirement from ==4.6.* to ==4.11.* (#315) Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version. - [Release notes](https://github.com/tox-dev/tox/releases) - [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/tox/compare/4.6.0...4.11.0) --- updated-dependencies: - dependency-name: tox dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 8bb9429c..d2102803 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.2.* pre-commit == 3.3.* psycopg2-binary == 2.9.* -tox == 4.6.* +tox == 4.11.* From e79e9c5705f0c5a2060d082eae02530e42bb1922 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:44:44 +0200 Subject: [PATCH 107/232] [pre-commit.ci] pre-commit autoupdate (#304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.9.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.9.0...v3.10.1) - [github.com/adamchainz/django-upgrade: 1.14.0 → 1.14.1](https://github.com/adamchainz/django-upgrade/compare/1.14.0...1.14.1) - [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.287](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.278...v0.0.287) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From d025e76e7acec2ea69bc995f1d74543b9296d959 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:44:49 +0200 Subject: [PATCH 108/232] Update coverage requirement from ==7.2.* to ==7.3.* (#312) Updates the requirements on [coverage](https://github.com/nedbat/coveragepy) to permit the latest version. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.2.0...7.3.0) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index d2102803..10170538 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -coverage == 7.2.* +coverage == 7.3.* pre-commit == 3.3.* psycopg2-binary == 2.9.* tox == 4.11.* From b6cd62093c39f24633dc6f531985d1251f63ca44 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Sep 2023 18:45:28 +0200 Subject: [PATCH 109/232] Update `CHANGELOG`. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aacf1aa..6f734363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update Italian translations. - Update Spanish translations. (by [@smunoz-ml](https://github.com/smunoz-ml) in #307) - Prevent multiple `.collapse-toggle` button. +- Bump requirements. +- Bump `pre-commit` hooks. ## [0.26.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.26.0) - 2023-05-11 - Add options for collapsible inlines. #263 (by [@fabiocaccamo](https://github.com/fabiocaccamo) in #282) From ea95d13c449820055c1ef8ada720e7d672ad967f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 18 Sep 2023 21:14:31 +0200 Subject: [PATCH 110/232] Run `dependabot` once a month. --- .github/dependabot.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ee78935f..b00d57e5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,13 +4,11 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "weekly" - day: "friday" + interval: "monthly" open-pull-requests-limit: 100 - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" - day: "friday" + interval: "monthly" open-pull-requests-limit: 100 From 36a8edd0f6c0ac151a5e424b0ca118492a10f863 Mon Sep 17 00:00:00 2001 From: Francesco Cataldo <78490028+FraCata00@users.noreply.github.com> Date: Mon, 18 Sep 2023 21:17:00 +0200 Subject: [PATCH 111/232] Reintroduce support for `show_change_link` with related modal. #323 --- .../static/admin_interface/related-modal/related-modal.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin_interface/static/admin_interface/related-modal/related-modal.js b/admin_interface/static/admin_interface/related-modal/related-modal.js index da49e35c..b815b851 100644 --- a/admin_interface/static/admin_interface/related-modal/related-modal.js +++ b/admin_interface/static/admin_interface/related-modal/related-modal.js @@ -147,6 +147,9 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined') // https://github.com/lincolnloop/django-dynamic-raw-id presentRelatedObjectModalOnClickOn('a.dynamic_raw_id-related-lookup', true); + // show_change_link=True support + presentRelatedObjectModalOnClickOn('a.inlinechangelink'); + // django-streamfield support // https://github.com/raagin/django-streamfield/ presentRelatedObjectModalOnClickOn('.streamfield_app a.stream-btn[href*="_popup=1"]'); From 40b6f187a6c76c9c62bb6e8a894e81bc1cbed4c5 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 18 Sep 2023 21:45:34 +0200 Subject: [PATCH 112/232] Run `precommit-auto-update` once a month. --- .github/workflows/pre-commit-autoupdate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 924f4c00..40d8c970 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -1,9 +1,9 @@ name: Pre-commit auto-update on: - # every day at midnight + # every month schedule: - - cron: "0 0 * * *" + - cron: "0 0 1 * *" # on demand workflow_dispatch: From 2606accbea0a1b49639df8a312471f33fa16d283 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 28 Sep 2023 22:38:04 +0200 Subject: [PATCH 113/232] Update dependabot.yml --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b00d57e5..bd1ca69b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,9 +6,17 @@ updates: schedule: interval: "monthly" open-pull-requests-limit: 100 + groups: + python-requirements: + patterns: + - "*" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "monthly" open-pull-requests-limit: 100 + groups: + github-actions: + patterns: + - "*" From 2d156814cc71f513bf9aa8069755e7a1f1162f46 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 2 Oct 2023 22:15:59 +0200 Subject: [PATCH 114/232] Revert "Update dependabot.yml" This reverts commit 2606accbea0a1b49639df8a312471f33fa16d283. --- .github/dependabot.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bd1ca69b..b00d57e5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,17 +6,9 @@ updates: schedule: interval: "monthly" open-pull-requests-limit: 100 - groups: - python-requirements: - patterns: - - "*" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "monthly" open-pull-requests-limit: 100 - groups: - github-actions: - patterns: - - "*" From 67c67fe27dd6ba1b5fed29a9cb7923d94d9aa03a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:39:41 +0200 Subject: [PATCH 115/232] Bump actions/checkout from 3 to 4 (#318) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/pre-commit-autoupdate.yml | 2 +- .github/workflows/test-package.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 47247924..a7d2c4eb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 53918788..74e9ff96 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Extract release notes id: extract-release-notes diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 40d8c970..29fa35bc 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -11,7 +11,7 @@ jobs: auto-update: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: '3.x' diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 6ce33212..0c6d9142 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create matrix uses: fabiocaccamo/create-matrix-action@v3 @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 @@ -78,7 +78,7 @@ jobs: steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install psycopg2 prerequisites run: sudo apt install libpq-dev From 7aed89c244574843f1c0ac17a70ab13172a442dd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:55:46 +0200 Subject: [PATCH 116/232] [pre-commit.ci] pre-commit autoupdate (#321) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.10.1 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.15.0) - [github.com/adamchainz/django-upgrade: 1.14.1 → 1.15.0](https://github.com/adamchainz/django-upgrade/compare/1.14.1...1.15.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.292](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.287...v0.0.292) - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e473576..190af634 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,19 +3,19 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.15.0 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/adamchainz/django-upgrade - rev: 1.14.1 + rev: 1.15.0 hooks: - id: django-upgrade args: ["--target-version", "3.0"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.0.292 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -27,12 +27,12 @@ repos: args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: fix-encoding-pragma args: [--remove] From 69815ed1035b3c6668a81cad6990c35a104581f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:59:59 +0200 Subject: [PATCH 117/232] Update pre-commit hooks. (#320) Co-authored-by: fabiocaccamo Co-authored-by: Fabio Caccamo From 0f69ccbb0a089e4ab4eea026301d244c91bcba60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:06:04 +0200 Subject: [PATCH 118/232] Update pre-commit requirement from ==3.3.* to ==3.4.* (#319) Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 10170538..80cba381 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.3.* -pre-commit == 3.3.* +pre-commit == 3.4.* psycopg2-binary == 2.9.* tox == 4.11.* From 8e045c71c1fc8467cbe1833e41d012201a1b4c87 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:30:13 +0100 Subject: [PATCH 119/232] [pre-commit.ci] pre-commit autoupdate (#329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.1.3) - [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 190af634..7a1a9d88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.0"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.292 + rev: v0.1.3 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -27,7 +27,7 @@ repos: args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black From 17f9f430fd45e4c52c621397ff5ee448ad1e6776 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Nov 2023 23:33:32 +0100 Subject: [PATCH 120/232] Bump `actions/setup-python`. --- .github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 0c6d9142..bacd4c1b 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: cache: 'pip' @@ -84,7 +84,7 @@ jobs: run: sudo apt install libpq-dev - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' From b1fcedbaed411fd9cb4e8220913985fcbae33876 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Nov 2023 23:39:21 +0100 Subject: [PATCH 121/232] Speed-up test workflow. --- .github/workflows/test-package.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index bacd4c1b..7961c8be 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -87,7 +87,20 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + # cache: 'pip' + + - name: Cache virtualenv + uses: actions/cache@v3 + with: + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }} + path: ./venv + + - name: Create virtualenv + run: | + python -m venv ./venv + source ./venv/bin/activate + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Upgrade pip version run: | From 7b7de54e60a0f1446eb84b2a1c1e677d643ea488 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 6 Nov 2023 23:53:10 +0100 Subject: [PATCH 122/232] Set python-version input in test workflow lint step. --- .github/workflows/test-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 7961c8be..42e32c13 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -38,6 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: + python-version: '3.x' cache: 'pip' - name: Install tools needed From 0ddb85298ded921aada81f1d26ab7c0a7e51ca9e Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 8 Nov 2023 22:23:26 +0100 Subject: [PATCH 123/232] Unpin requirements patch version. --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2928c2c7..9fbfba23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ django >= 2.2 -django-colorfield == 0.10.1 -python-slugify == 8.0.1 +django-colorfield == 0.10.* +python-slugify == 8.0.* From 2350854e45e5ea4e2080e2ad315dc4becb7842db Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 8 Nov 2023 22:46:40 +0100 Subject: [PATCH 124/232] Revert "Unpin requirements patch version." This reverts commit 0ddb85298ded921aada81f1d26ab7c0a7e51ca9e. --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9fbfba23..2928c2c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ django >= 2.2 -django-colorfield == 0.10.* -python-slugify == 8.0.* +django-colorfield == 0.10.1 +python-slugify == 8.0.1 From 1c1945c1d918ce78fc6285caf58d9345b681445a Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sat, 11 Nov 2023 20:17:43 +0100 Subject: [PATCH 125/232] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2caea03d..c4809143 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl - `django-streamfield` - `django-tabbed-admin` - `sorl-thumbnail` -- Translated in many languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr` +- Translated in many languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `ru`, `tr` ## Installation - Run `pip install django-admin-interface` From 55be190dc0154e8fbeaf60fbd8fea98d6dfa53e2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 24 Nov 2023 18:07:44 +0100 Subject: [PATCH 126/232] Add `Python 3.12` to tests. --- .github/workflows/test-package.yml | 1 + pyproject.toml | 1 + tox.ini | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 42e32c13..75960d3a 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -23,6 +23,7 @@ jobs: python-version {3.9}, django-version {3.0, 3.1, 3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} python-version {3.10}, django-version {3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} python-version {3.11}, django-version {4.1, 4.2}, database {sqlite, postgres} + python-version {3.12}, django-version {4.2}, database {sqlite, postgres} outputs: matrix: ${{ steps.create_matrix.outputs.matrix }} diff --git a/pyproject.toml b/pyproject.toml index e8b932ce..bb8170bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Build Tools", ] dependencies = [ diff --git a/tox.ini b/tox.ini index f14cce71..c8109dae 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = py39-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite,postgres}, py310-{dj32,dj40,dj41,dj42}-{sqlite,postgres}, py311-{dj41,dj42}-{sqlite,postgres}, + py312-{dj42}-{sqlite,postgres}, [gh-actions] python = @@ -11,6 +12,7 @@ python = 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 [testenv] passenv = CI,GITHUB_WORKFLOW From 43dca1ae937b3096fe7e14b59e78fa1223878087 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 4 Dec 2023 12:10:00 +0100 Subject: [PATCH 127/232] Add missing license. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index bb8170bd..21aa54d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ dependencies = [ "python-slugify >= 7.0.0, < 9.0.0", ] dynamic = ["version"] +license = "MIT" maintainers = [ { name = "Fabio Caccamo", email = "fabio.caccamo@gmail.com" }, ] From b393c11ecb2b54830a85088ea2e5c0179d402dee Mon Sep 17 00:00:00 2001 From: Julian Wachholz Date: Tue, 5 Dec 2023 12:18:44 +0100 Subject: [PATCH 128/232] Simplify language chooser (#328) * Simplify language chooser - Allows usage of i18n_patterns with prefix_default_language=False - Change templatetag from simple tag to an inclusion tag - Reduces complexity by relying on Django's behavior in the set_language view: it will translate any url passed as 'next'. This behavior has been present since Django 1.9. - Remove individual forms for each language Fixes #327 Reference: https://github.com/django/django/commit/aa5ab114e34645823b219f9a866fd82fc26b427b * Add check to ensure LocaleMiddleware * Remove check in favor of silent warning * Fix template tag tests --- .../templates/admin/base_site.html | 3 +- .../admin_interface/language_chooser.html | 19 ++- .../templatetags/admin_interface_tags.py | 45 +++---- tests/settings.py | 1 + tests/test_templatetags.py | 126 ++++++------------ 5 files changed, 71 insertions(+), 123 deletions(-) diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 76129a82..1efe5f76 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -186,7 +186,6 @@

{{ block.super }} {% get_admin_interface_theme as theme %} {% if theme.language_chooser_active %} - {% get_admin_interface_languages as languages %} - {% include "admin_interface/language_chooser.html" %} + {% admin_interface_language_chooser %} {% endif %} {% endblock %} diff --git a/admin_interface/templates/admin_interface/language_chooser.html b/admin_interface/templates/admin_interface/language_chooser.html index 1b69cfe7..b954c7fc 100644 --- a/admin_interface/templates/admin_interface/language_chooser.html +++ b/admin_interface/templates/admin_interface/language_chooser.html @@ -1,18 +1,15 @@ {% load admin_interface_tags %} -{% if languages %} +{% if set_language_url %}
- {% for language in languages %} -
+ {% csrf_token %} - -
- {% endfor %} -
- {% csrf_token %} - +
diff --git a/admin_interface/templatetags/admin_interface_tags.py b/admin_interface/templatetags/admin_interface_tags.py index 1eceb36a..b6f0b83c 100644 --- a/admin_interface/templatetags/admin_interface_tags.py +++ b/admin_interface/templatetags/admin_interface_tags.py @@ -1,6 +1,7 @@ import datetime import hashlib import re +import warnings from django import template from django.conf import settings @@ -16,45 +17,43 @@ register = template.Library() -@register.simple_tag(takes_context=True) -def get_admin_interface_languages(context): +@register.inclusion_tag("admin_interface/language_chooser.html", takes_context=True) +def admin_interface_language_chooser(context): if not settings.USE_I18N: # i18n disabled return None if len(settings.LANGUAGES) < 2: # less than 2 languages return None + if "django.middleware.locale.LocaleMiddleware" not in settings.MIDDLEWARE: + warnings.warn( + "Language chooser requires 'django.middleware.locale.LocaleMiddleware' " + "in your MIDDLEWARE to work.", + stacklevel=1, + ) + return None try: - set_language_url = reverse("set_language") + context["set_language_url"] = reverse("set_language") except NoReverseMatch: - # ImproperlyConfigured - must include i18n urls: - # urlpatterns += [url(r'^i18n/', include('django.conf.urls.i18n')),] + warnings.warn( + "Language chooser requires Django's `set_language` view: " + "`urlpatterns += [url(r'^i18n/', include('django.conf.urls.i18n'))]`.", + stacklevel=1, + ) return None request = context.get("request", None) if not request: return None + context["LANGUAGES"] = settings.LANGUAGES + full_path = request.get_full_path() admin_nolang_url = re.sub(r"^\/([\w]{2})([\-\_]{1}[\w]{2,4})?\/", "/", full_path) - if admin_nolang_url == full_path: - # ImproperlyConfigured - must include admin urls using i18n_patterns: - # from django.conf.urls.i18n import i18n_patterns - # urlpatterns += i18n_patterns(url(r'^admin/', admin.site.urls)) - return None - langs_data = [] + default_lang_code = settings.LANGUAGE_CODE current_lang_code = translation.get_language() or default_lang_code - for language in settings.LANGUAGES: - lang_code = language[0].lower() - lang_name = language[1].title() - lang_data = { - "code": lang_code, - "name": lang_name, - "default": lang_code == default_lang_code, - "active": lang_code == current_lang_code, - "activation_url": f"{set_language_url}?next=/{lang_code}{admin_nolang_url}", - } - langs_data.append(lang_data) - return langs_data + context["LANGUAGE_CODE"] = current_lang_code + context["next"] = admin_nolang_url + return context @register.simple_tag() diff --git a/tests/settings.py b/tests/settings.py index 14b3c7bd..812a8214 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -26,6 +26,7 @@ "django.contrib.messages.middleware.MessageMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", + "django.middleware.locale.LocaleMiddleware", ] TEMPLATES = [ diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 8de4b88b..991d7d60 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -22,118 +22,70 @@ def tearDown(self): def __render_template(self, string, context=None): return Template(string).render(Context(context or {})) - def test_get_admin_interface_languages(self): + def test_admin_interface_language_chooser(self): context = Context({"request": self.request_factory.get("/en/admin/")}) - languages = templatetags.get_admin_interface_languages(context) + context = templatetags.admin_interface_language_chooser(context) + languages = context["LANGUAGES"] expected_languages = [ - { - "code": "de", - "name": "Deutsch", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/de/admin/", - }, - { - "code": "en", - "name": "English", - "default": True, - "active": True, - "activation_url": "/i18n/setlang/?next=/en/admin/", - }, - { - "code": "es", - "name": "Español", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/es/admin/", - }, - { - "code": "fa", - "name": "Farsi", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/fa/admin/", - }, - { - "code": "fr", - "name": "Français", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/fr/admin/", - }, - { - "code": "it", - "name": "Italiano", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/it/admin/", - }, - { - "code": "pl", - "name": "Polski", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/pl/admin/", - }, - { - "code": "pt-BR", - "name": "Português", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/pt-br/admin/", - }, - { - "code": "ru", - "name": "Русский", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/ru/admin/", - }, - { - "code": "tr", - "name": "Türk", - "default": False, - "active": False, - "activation_url": "/i18n/setlang/?next=/tr/admin/", - }, + ("de", "Deutsch"), + ("en", "English"), + ("es", "Español"), + ("fa", "Farsi"), + ("fr", "Français"), + ("it", "Italiano"), + ("pl", "Polski"), + ("pt-BR", "Português"), + ("ru", "Русский"), + ("tr", "Türk"), ] self.assertEqual(len(languages), len(expected_languages)) self.assertEqual(languages[0], expected_languages[0]) self.assertEqual(languages[1], expected_languages[1]) + self.assertEqual(context["next"], "/admin/") @override_settings( USE_I18N=False, ) - def test_get_admin_interface_languages_with_i18n_disabled(self): + def test_admin_interface_language_chooser_with_i18n_disabled(self): context = Context({"request": self.request_factory.get("/en/admin/")}) - languages = templatetags.get_admin_interface_languages(context) - self.assertEqual(languages, None) + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context, None) @override_settings( ROOT_URLCONF="tests.urls_without_i18n_patterns", ) - def test_get_admin_interface_languages_without_i18n_url_patterns(self): + def test_admin_interface_language_chooser_without_i18n_url_patterns(self): context = Context({"request": self.request_factory.get("/en/admin/")}) - languages = templatetags.get_admin_interface_languages(context) - self.assertEqual(languages, None) + with self.assertWarnsMessage(UserWarning, "django.conf.urls.i18n"): + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context, None) + + @override_settings( + MIDDLEWARE=[], + ) + def test_admin_interface_language_chooser_without_locale_middleware(self): + context = Context({"request": self.request_factory.get("/en/admin/")}) + with self.assertWarnsMessage(UserWarning, "LocaleMiddleware"): + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context, None) @override_settings( LANGUAGES=(("en", "English"),), ) - def test_get_admin_interface_languages_without_multiple_languages(self): + def test_admin_interface_language_chooser_without_multiple_languages(self): context = Context({"request": self.request_factory.get("/en/admin/")}) - languages = templatetags.get_admin_interface_languages(context) - self.assertEqual(languages, None) + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context, None) - def test_get_admin_interface_languages_without_request(self): + def test_admin_interface_language_chooser_without_request(self): context = Context({}) - languages = templatetags.get_admin_interface_languages(context) - self.assertEqual(languages, None) + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context, None) - def test_get_admin_interface_languages_without_language_prefix_in_url(self): + def test_admin_interface_language_chooser_without_language_prefix_in_url(self): context = Context({"request": self.request_factory.get("/admin/")}) - languages = templatetags.get_admin_interface_languages(context) - self.assertEqual(languages, None) + tag_context = templatetags.admin_interface_language_chooser(context) + self.assertEqual(tag_context["next"], "/admin/") def test_get_theme(self): Theme.objects.all().delete() From a52f670c857b612ee35af0dc82ca3acc6d14a2ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:19:18 +0100 Subject: [PATCH 129/232] Update pre-commit hooks. (#335) Co-authored-by: fabiocaccamo --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a1a9d88..8530c662 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: args: ["--target-version", "3.0"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 + rev: v0.1.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -27,7 +27,7 @@ repos: args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black From e1d79b9df0383f3a5da6cd68adfcde2591e36ee2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:19:35 +0100 Subject: [PATCH 130/232] [pre-commit.ci] pre-commit autoupdate (#332) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.3 → v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.3...v0.1.6) - [github.com/psf/black: 23.10.1 → 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> From f32203fd9ab55c2539f7bde261d730c311a76ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:19:51 +0100 Subject: [PATCH 131/232] Update pre-commit requirement from ==3.4.* to ==3.5.* (#331) Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 80cba381..d24aef7b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.3.* -pre-commit == 3.4.* +pre-commit == 3.5.* psycopg2-binary == 2.9.* tox == 4.11.* From 6462083e95bacb0c3b2743f88f84aae5e6ad9f30 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 21:50:19 +0100 Subject: [PATCH 132/232] Add `Django 5.0` to tests. --- .github/workflows/test-package.yml | 6 +++--- pyproject.toml | 1 + tox.ini | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 75960d3a..06012af0 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -21,9 +21,9 @@ jobs: matrix: | python-version {3.8}, django-version {3.0, 3.1, 3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} python-version {3.9}, django-version {3.0, 3.1, 3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} - python-version {3.10}, django-version {3.2, 4.0, 4.1, 4.2}, database {sqlite, postgres} - python-version {3.11}, django-version {4.1, 4.2}, database {sqlite, postgres} - python-version {3.12}, django-version {4.2}, database {sqlite, postgres} + python-version {3.10}, django-version {3.2, 4.0, 4.1, 4.2, 5.0}, database {sqlite, postgres} + python-version {3.11}, django-version {4.1, 4.2, 5.0}, database {sqlite, postgres} + python-version {3.12}, django-version {4.2, 5.0}, database {sqlite, postgres} outputs: matrix: ${{ steps.create_matrix.outputs.matrix }} diff --git a/pyproject.toml b/pyproject.toml index 21aa54d4..71ce74cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Framework :: Django :: 4.0", "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", diff --git a/tox.ini b/tox.ini index c8109dae..a9c656fe 100644 --- a/tox.ini +++ b/tox.ini @@ -2,9 +2,9 @@ envlist = py38-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite,postgres}, py39-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite,postgres}, - py310-{dj32,dj40,dj41,dj42}-{sqlite,postgres}, - py311-{dj41,dj42}-{sqlite,postgres}, - py312-{dj42}-{sqlite,postgres}, + py310-{dj32,dj40,dj41,dj42,dj50}-{sqlite,postgres}, + py311-{dj41,dj42,dj50}-{sqlite,postgres}, + py312-{dj42,dj50}-{sqlite,postgres}, [gh-actions] python = @@ -29,6 +29,7 @@ deps = dj40: Django == 4.0.* dj41: Django == 4.1.* dj42: Django == 4.2.* + dj50: Django == 5.0.* -r requirements.txt -r requirements-test.txt From 67bb404a84ee7334dd0fbf4f98279d9f47d94669 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 22:05:58 +0100 Subject: [PATCH 133/232] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 71ce74cb..3e59462d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,6 @@ dependencies = [ "python-slugify >= 7.0.0, < 9.0.0", ] dynamic = ["version"] -license = "MIT" maintainers = [ { name = "Fabio Caccamo", email = "fabio.caccamo@gmail.com" }, ] From f9df5baa191a3cce17f251f2a4635a6b75775bad Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 22:06:01 +0100 Subject: [PATCH 134/232] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4809143..fda7f8f3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ [![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-admin-interface?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codacy/grade/21cb657283c04e70b56fb935277a1ad1?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-admin-interface?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-admin-interface/) -[![](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=black)](https://github.com/psf/black) +[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) # django-admin-interface django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**. From 66600faec6d83c4589b5fa1a7bea4936f364d5e2 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 23:25:11 +0100 Subject: [PATCH 135/232] Fix tests. --- tests/test_templatetags.py | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 991d7d60..ac622fc5 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -159,21 +159,26 @@ def test_get_active_date_hierarchy_active(self): self.assertEqual(date_field, "last_login") - def _add_changelist_methods(self, mock, params): - def get_query_string(**kwargs): - return ChangeList.get_query_string(mock, **kwargs) + def _get_changelist_mock(self, params=None): + class ChangelistMock(Mock): + def __init__(self, params=None, *args, **kwargs): + super().__init__(*args, **kwargs) + # django < 5.0 + self.params = params or {} + # django >= 5.0 + self.filter_params = params or {} - def get_filters_params(**kwargs): - return ChangeList.get_filters_params(mock, **kwargs) + def get_query_string(self, **kwargs): + return ChangeList.get_query_string(self, **kwargs) - mock.get_query_string = get_query_string - mock.get_filters_params = get_filters_params - mock.params = params + def get_filters_params(self, **kwargs): + return ChangeList.get_filters_params(self, **kwargs) + + return ChangelistMock(params=params) def test_filter_removal_link(self): - changelist = Mock() params = {"shape": "pointy", "size": "small"} - self._add_changelist_methods(changelist, params) + changelist = self._get_changelist_mock(params) list_filter = Mock() list_filter.title = "Shape filter" choices = [{"display": "Round"}, {"display": "Pointy", "selected": True}] @@ -187,9 +192,8 @@ def test_filter_removal_link(self): self.assertEqual(ctx["selected_value"], "Pointy") def test_filter_removal_link_no_display(self): - changelist = Mock() params = {"shape": "pointy", "size": "small"} - self._add_changelist_methods(changelist, params) + changelist = self._get_changelist_mock(params) list_filter = Mock() list_filter.title = "Shape filter" choices = [{"other": "Round"}, {"other": "Pointy", "selected": True}] @@ -203,9 +207,8 @@ def test_filter_removal_link_no_display(self): self.assertEqual(ctx["selected_value"], "...") def test_date_hierarchy_removal_link_year(self): - changelist = Mock() params = {"shape": "pointy", "last_login__year": 2022} - self._add_changelist_methods(changelist, params) + changelist = self._get_changelist_mock(params) changelist.model._meta.get_field.return_value.verbose_name = "last login" ctx = templatetags.admin_interface_date_hierarchy_removal_link( @@ -217,11 +220,9 @@ def test_date_hierarchy_removal_link_year(self): self.assertEqual(ctx["date_value"], date(2022, 1, 1)) def test_date_hierarchy_removal_link_year_month(self): - changelist = Mock() - changelist.model._meta.get_field.return_value.verbose_name = "last login" params = {"last_login__year": 2022, "last_login__month": "11"} - self._add_changelist_methods(changelist, params) - + changelist = self._get_changelist_mock(params) + changelist.model._meta.get_field.return_value.verbose_name = "last login" ctx = templatetags.admin_interface_date_hierarchy_removal_link( changelist, "last_login" ) @@ -231,8 +232,6 @@ def test_date_hierarchy_removal_link_year_month(self): self.assertEqual(ctx["date_value"], date(2022, 11, 1)) def test_date_hierarchy_removal_link_year_month_day(self): - changelist = Mock() - changelist.model._meta.get_field.return_value.verbose_name = "last login" params = { "last_login__year": 2022, "last_login__month": "11", @@ -240,8 +239,8 @@ def test_date_hierarchy_removal_link_year_month_day(self): "shape": "round", "size": "small", } - self._add_changelist_methods(changelist, params) - + changelist = self._get_changelist_mock(params) + changelist.model._meta.get_field.return_value.verbose_name = "last login" ctx = templatetags.admin_interface_date_hierarchy_removal_link( changelist, "last_login" ) From 1131e0da6becd0156d2d1b6611dfbfe46f6b4d8b Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 23:26:58 +0100 Subject: [PATCH 136/232] Rename variable. --- tests/test_templatetags.py | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index ac622fc5..28c6da8e 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -185,11 +185,13 @@ def test_filter_removal_link(self): list_filter.choices.return_value = choices list_filter.expected_parameters.return_value = ("shape",) - ctx = templatetags.admin_interface_filter_removal_link(changelist, list_filter) + context = templatetags.admin_interface_filter_removal_link( + changelist, list_filter + ) - self.assertEqual(ctx["removal_link"], "?size=small") - self.assertEqual(ctx["title"], "Shape filter") - self.assertEqual(ctx["selected_value"], "Pointy") + self.assertEqual(context["removal_link"], "?size=small") + self.assertEqual(context["title"], "Shape filter") + self.assertEqual(context["selected_value"], "Pointy") def test_filter_removal_link_no_display(self): params = {"shape": "pointy", "size": "small"} @@ -200,36 +202,39 @@ def test_filter_removal_link_no_display(self): list_filter.choices.return_value = choices list_filter.expected_parameters.return_value = ("shape",) - ctx = templatetags.admin_interface_filter_removal_link(changelist, list_filter) + context = templatetags.admin_interface_filter_removal_link( + changelist, list_filter + ) - self.assertEqual(ctx["removal_link"], "?size=small") - self.assertEqual(ctx["title"], "Shape filter") - self.assertEqual(ctx["selected_value"], "...") + self.assertEqual(context["removal_link"], "?size=small") + self.assertEqual(context["title"], "Shape filter") + self.assertEqual(context["selected_value"], "...") def test_date_hierarchy_removal_link_year(self): params = {"shape": "pointy", "last_login__year": 2022} changelist = self._get_changelist_mock(params) changelist.model._meta.get_field.return_value.verbose_name = "last login" - ctx = templatetags.admin_interface_date_hierarchy_removal_link( + context = templatetags.admin_interface_date_hierarchy_removal_link( changelist, "last_login" ) - self.assertEqual(ctx["removal_link"], "?shape=pointy") - self.assertEqual(ctx["date_label"], "last login") - self.assertEqual(ctx["date_value"], date(2022, 1, 1)) + self.assertEqual(context["removal_link"], "?shape=pointy") + self.assertEqual(context["date_label"], "last login") + self.assertEqual(context["date_value"], date(2022, 1, 1)) def test_date_hierarchy_removal_link_year_month(self): params = {"last_login__year": 2022, "last_login__month": "11"} changelist = self._get_changelist_mock(params) changelist.model._meta.get_field.return_value.verbose_name = "last login" - ctx = templatetags.admin_interface_date_hierarchy_removal_link( + + context = templatetags.admin_interface_date_hierarchy_removal_link( changelist, "last_login" ) - self.assertEqual(ctx["removal_link"], "?") - self.assertEqual(ctx["date_label"], "last login") - self.assertEqual(ctx["date_value"], date(2022, 11, 1)) + self.assertEqual(context["removal_link"], "?") + self.assertEqual(context["date_label"], "last login") + self.assertEqual(context["date_value"], date(2022, 11, 1)) def test_date_hierarchy_removal_link_year_month_day(self): params = { @@ -241,10 +246,11 @@ def test_date_hierarchy_removal_link_year_month_day(self): } changelist = self._get_changelist_mock(params) changelist.model._meta.get_field.return_value.verbose_name = "last login" - ctx = templatetags.admin_interface_date_hierarchy_removal_link( + + context = templatetags.admin_interface_date_hierarchy_removal_link( changelist, "last_login" ) - self.assertEqual(ctx["removal_link"], "?shape=round&size=small") - self.assertEqual(ctx["date_label"], "last login") - self.assertEqual(ctx["date_value"], date(2022, 11, 30)) + self.assertEqual(context["removal_link"], "?shape=round&size=small") + self.assertEqual(context["date_label"], "last login") + self.assertEqual(context["date_value"], date(2022, 11, 30)) From 13965eacf2492be6ee7e75f52056937bbd937f25 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Dec 2023 23:35:47 +0100 Subject: [PATCH 137/232] Update CHANGELOG and version. --- CHANGELOG.md | 12 ++++++++++++ admin_interface/metadata.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f734363..e8ab75fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.27.0](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.27.0) - 2023-12-05 +- Add `Python 3.12` support. +- Add `Django 5.0` support. +- Fix broken language-chooser with `i18n_patterns(..., prefix_default_language=False)`. #327 (by [@julianwachholz](https://github.com/julianwachholz) in #328) +- Simplify language-chooser. #327 (by [@julianwachholz](https://github.com/julianwachholz) in #328) +- Speed-up test workflow. +- Bump requirements. +- Bump `pre-commit` hooks. + +### Contributors +- [@julianwachholz](https://github.com/julianwachholz) + ## [0.26.1](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.26.1) - 2023-09-05 - Fix logout and theme buttons style. #246 - Add Russian translation. (by [@rustzzdevel](https://github.com/rustzzdevel) in #295) diff --git a/admin_interface/metadata.py b/admin_interface/metadata.py index 39cb9c72..fa5605ec 100644 --- a/admin_interface/metadata.py +++ b/admin_interface/metadata.py @@ -7,4 +7,4 @@ __email__ = "fabio.caccamo@gmail.com" __license__ = "MIT" __title__ = "django-admin-interface" -__version__ = "0.26.1" +__version__ = "0.27.0" From fb18a8d455ed173ad948ab07cde52ceca8b65c91 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 11 Dec 2023 23:51:06 +0100 Subject: [PATCH 138/232] Replace `Black` and `isort` with `Ruff-format`. --- .pre-commit-config.yaml | 14 ++------------ pyproject.toml | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8530c662..191e1c46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,21 +15,11 @@ repos: args: ["--target-version", "3.0"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.1.7 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - - - repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - args: ["--profile", "black"] - - - repo: https://github.com/psf/black - rev: 23.11.0 - hooks: - - id: black + - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 diff --git a/pyproject.toml b/pyproject.toml index 3e59462d..1126454b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,9 +84,6 @@ exclude = ''' )/ ''' -[tool.isort] -profile = "black" - [tool.ruff] ignore = [] line-length = 88 From 3000c9024e535ac1ebf69ee944aa321adfbcf354 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 12 Dec 2023 00:04:55 +0100 Subject: [PATCH 139/232] Update test-package.yml --- .github/workflows/test-package.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 06012af0..0dd21286 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -89,20 +89,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - # cache: 'pip' - - - name: Cache virtualenv - uses: actions/cache@v3 - with: - key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }} - path: ./venv - - - name: Create virtualenv - run: | - python -m venv ./venv - source ./venv/bin/activate - echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH - echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV + cache: 'pip' - name: Upgrade pip version run: | From a7e8c4da09544074cc38f92622035cfed2a52d0f Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Mon, 18 Dec 2023 19:01:51 +0100 Subject: [PATCH 140/232] Update `create-release.yml` workflow: publish releases with a Trusted Publisher. --- .github/workflows/create-release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 74e9ff96..fd6a2101 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: ubuntu-latest + # environment: release + permissions: + id-token: write steps: - name: Checkout @@ -38,5 +41,5 @@ jobs: - name: Publish on PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages_dir: dist/ - password: ${{ secrets.WORKFLOWS_PUBLISH_TO_PYPI_TOKEN }} + packages-dir: dist/ + # password: ${{ secrets.WORKFLOWS_PUBLISH_TO_PYPI_TOKEN }} From 6db363518d9766133633c0e87157c216a5d95141 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 19 Dec 2023 18:20:27 +0100 Subject: [PATCH 141/232] [css] Fix paginator appearance. --- .../static/admin_interface/css/admin-interface-fix.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin_interface/static/admin_interface/css/admin-interface-fix.css b/admin_interface/static/admin_interface/css/admin-interface-fix.css index e4cb7eaa..81859349 100644 --- a/admin_interface/static/admin_interface/css/admin-interface-fix.css +++ b/admin_interface/static/admin_interface/css/admin-interface-fix.css @@ -140,7 +140,9 @@ .admin-interface #changelist .paginator { margin-top:-1px; /* merge 2 borders into 1 */ - line-height:42px; + line-height: 1.5em; + padding-top: 15px; + padding-bottom: 15px; } .admin-interface .paginator a, From 75b1292e2988e2cfa7befe29fef3cc3b09f0988c Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 10:50:54 +0100 Subject: [PATCH 142/232] Move third-party compatibility CSS files to a `third-party` folder. --- .../css/third-party/ckeditor.css | 126 +++++++++++ .../css/third-party/import-export.css | 7 + .../css/third-party/json-widget.css | 27 +++ .../css/third-party/modeltranslation.css | 17 ++ .../css/third-party/rangefilter.css | 25 +++ .../css/third-party/sorl-thumbnail.css | 67 ++++++ .../css/third-party/streamfield.css | 200 ++++++++++++++++++ .../css/third-party/tabbed-admin.css | 37 ++++ .../css/third-party/tinymce.css | 3 + .../templates/admin/base_site.html | 25 +-- 10 files changed, 520 insertions(+), 14 deletions(-) create mode 100644 admin_interface/static/admin_interface/css/third-party/ckeditor.css create mode 100644 admin_interface/static/admin_interface/css/third-party/import-export.css create mode 100644 admin_interface/static/admin_interface/css/third-party/json-widget.css create mode 100644 admin_interface/static/admin_interface/css/third-party/modeltranslation.css create mode 100644 admin_interface/static/admin_interface/css/third-party/rangefilter.css create mode 100644 admin_interface/static/admin_interface/css/third-party/sorl-thumbnail.css create mode 100644 admin_interface/static/admin_interface/css/third-party/streamfield.css create mode 100644 admin_interface/static/admin_interface/css/third-party/tabbed-admin.css create mode 100644 admin_interface/static/admin_interface/css/third-party/tinymce.css diff --git a/admin_interface/static/admin_interface/css/third-party/ckeditor.css b/admin_interface/static/admin_interface/css/third-party/ckeditor.css new file mode 100644 index 00000000..952120cb --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/ckeditor.css @@ -0,0 +1,126 @@ +/* +ckeditor + light theme +https://github.com/Ikimea/ckeditor-light-theme +*/ + +.admin-interface .cke { + border: none; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +.admin-interface .cke_inner, +.admin-interface .cke_wysiwyg_frame { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} + +.admin-interface .cke_inner { + border: 1px solid #CCCCCC; +} + +.admin-interface .cke_chrome { + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.admin-interface .cke_top { + background: #f8f8f8; + border-top: none; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #EEEEEE; + padding-left: 10px; + padding-right: 10px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.admin-interface .cke_toolgroup { + background: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.admin-interface .cke_bottom { + background: #f8f8f8; + border-top: 1px solid #EEEEEE; + + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.admin-interface .cke_source { + padding: 13px 15px; + box-sizing: border-box; +} + +.admin-interface a.cke_button, +.admin-interface a.cke_button:active, +.admin-interface a.cke_button:hover, +.admin-interface a.cke_button:focus { + box-shadow: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + background-image: none; + border-radius: 4px; + border: none; +} + +.admin-interface a.cke_button:active, +.admin-interface a.cke_button:hover, +.admin-interface a.cke_button:focus { + background-color: #E8E8E8 !important; +} + +.admin-interface a.cke_button.cke_button_on { + background-color: #CCCCCC !important; +} + +.admin-interface a.cke_button.cke_button_disabled { + background-color: transparent !important; +} + +.admin-interface .cke_resizer { + border-color: transparent #666666 transparent transparent; +} + +@media (max-width: 767px){ + + .admin-interface .django-ckeditor-widget, + .admin-interface .cke { + width: 100% !important; + } + + .admin-interface .cke_top { + padding-left: 10px; + padding-right: 10px; + } + + .admin-interface .cke_toolbar { + height: auto; + } + + .admin-interface .cke_contents { + height: auto; + } + + .admin-interface .tabular .django-ckeditor-widget, + .admin-interface .tabular .cke { + width: 400px !important; + } + + .admin-interface .tabular .cke_contents { + height: 90px !important; + } +} diff --git a/admin_interface/static/admin_interface/css/third-party/import-export.css b/admin_interface/static/admin_interface/css/third-party/import-export.css new file mode 100644 index 00000000..8ea0a092 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/import-export.css @@ -0,0 +1,7 @@ +/* Fix left/right scrolling broken with django-import-export #165 */ +.admin-interface table.import-preview { + display: block; + width: 100%; + max-width: 100%; + overflow: auto; +} diff --git a/admin_interface/static/admin_interface/css/third-party/json-widget.css b/admin_interface/static/admin_interface/css/third-party/json-widget.css new file mode 100644 index 00000000..e0a999d1 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/json-widget.css @@ -0,0 +1,27 @@ +/* +django-json-widget support +https://github.com/jmrivas86/django-json-widget +*/ + +.admin-interface div.jsoneditor { + border: 1px solid var(--admin-interface-module-background-color); + border-radius: var(--admin-interface-jsoneditor-border-radius); + overflow: var(--admin-interface-jsoneditor-overflow); +} + +.admin-interface div.jsoneditor-menu { + background-color: var(--admin-interface-module-background-color); + border-bottom: 1px solid var(--admin-interface-module-background-color); +} + +.admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy { + color: var(--admin-interface-module-link-color); +} + +.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected, +.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus, +.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover { + background-color: var(--admin-interface-module-background-selected-color); + color: #000000; + font-weight: bold; +} diff --git a/admin_interface/static/admin_interface/css/third-party/modeltranslation.css b/admin_interface/static/admin_interface/css/third-party/modeltranslation.css new file mode 100644 index 00000000..9e1890b3 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/modeltranslation.css @@ -0,0 +1,17 @@ +/* +django-modeltranslation support +https://github.com/deschler/django-modeltranslation +*/ + +.admin-interface #content h1 select { + text-transform: uppercase; + margin-left: 15px; + min-width: 50px; +} + +.admin-interface .ui-tabs .ui-tabs-panel[id^=tab_id_] { + border: none; + border-top: 1px solid #eeeeee; + padding: 0; + margin-bottom: 0; +} diff --git a/admin_interface/static/admin_interface/css/third-party/rangefilter.css b/admin_interface/static/admin_interface/css/third-party/rangefilter.css new file mode 100644 index 00000000..25b4f0ba --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/rangefilter.css @@ -0,0 +1,25 @@ +.admin-interface #changelist-filter .admindatefilter { + border-bottom: 1px solid var(--hairline-color); +} + +.admin-interface #changelist-filter .admindatefilter .button, +.admin-interface #changelist-filter .admindatefilter .submit-row input, +.admin-interface #changelist-filter .admindatefilter a.button, +.admin-interface #changelist-filter .admindatefilter input[type="submit"], +.admin-interface #changelist-filter .admindatefilter input[type="button"], +.admin-interface #changelist-filter .admindatefilter input[type="reset"] { + background: var(--admin-interface-module-background-color); + color: var(--admin-interface-module-link-color); + padding: 6px 10px; + font-size: 12px; + margin-right: 4px; +} + +.admin-interface #changelist-filter .admindatefilter .button:hover, +.admin-interface #changelist-filter .admindatefilter .submit-row input:hover, +.admin-interface #changelist-filter .admindatefilter a.button:hover, +.admin-interface #changelist-filter .admindatefilter input[type="submit"]:hover, +.admin-interface #changelist-filter .admindatefilter input[type="button"]:hover, +.admin-interface #changelist-filter .admindatefilter input[type="reset"]:hover { + color: var(--admin-interface-module-link-hover-color); +} diff --git a/admin_interface/static/admin_interface/css/third-party/sorl-thumbnail.css b/admin_interface/static/admin_interface/css/third-party/sorl-thumbnail.css new file mode 100644 index 00000000..44c61909 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/sorl-thumbnail.css @@ -0,0 +1,67 @@ +/* +sorl-thumbnail - improved AdminImageMixin widget layout +https://github.com/mariocesar/sorl-thumbnail +*/ + +.admin-interface a.thumbnail + a { + font-weight: normal; +} + +.admin-interface a.thumbnail + a + input[type="checkbox"] { + margin: 10px 0px 10px 18px; +} + +@media (max-width: 767px){ + .admin-interface a.thumbnail + a { + display: block; + margin-top: 3px; + white-space: pre-wrap; + word-break: break-word; + } + .admin-interface a.thumbnail + a + input[type="checkbox"] { + margin: 15px 0; + } +} + +.admin-interface a.thumbnail ~ label { + color: #333; + font-size: 11px; + display: inline; + float: none; + margin-left: 2px; +} + +.admin-interface.change-form div[style="float:left"] { + font-size: 11px; + font-weight: bold; + color: #666; + margin-bottom: 5px; +} + +@media (max-width: 767px){ + .admin-interface.change-form div[style="float:left"] { + font-size: 12px; + width: 100%; + } +} + +.admin-interface .aligned .form-row a.thumbnail ~ input[type="file"] { + margin-top: 0px; +} + +@media (max-width:767px){ + .admin-interface .aligned .form-row a.thumbnail ~ input[type="file"] { + width: auto; + padding: 0px; + display: block; + margin-top: 3px; + } + + .admin-interface div[style="float:left"] { + margin-bottom: 0px; + } + + .admin-interface div[style="float:left"] + div.help { + margin-top: 0px !important; + } +} diff --git a/admin_interface/static/admin_interface/css/third-party/streamfield.css b/admin_interface/static/admin_interface/css/third-party/streamfield.css new file mode 100644 index 00000000..71ce2dbe --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/streamfield.css @@ -0,0 +1,200 @@ +/* +django-streamfield support +https://github.com/raagin/django-streamfield/ +*/ + +.admin-interface .form-row.field-stream { + margin: 0; + padding: 0; + border-bottom: none; +} + +.admin-interface .form-row.field-stream label[for=id_stream] { + display: none; +} + +.admin-interface .streamfield_app { + clear: both; + width: 100%; +} + +.admin-interface .streamfield_app .stream-help-text { + margin-bottom: 15px; + display: flex; + flex-direction: column; + clear: both; +} + +.admin-interface .streamfield_app .stream-help-text .stream-help-text__title { + align-self: flex-end; + user-select: none; + padding: 8px; + padding-right: 0; + color: var(--admin-interface-generic-link-color); +} + +.admin-interface .streamfield_app .stream-help-text .stream-help-text__title:hover { + color: var(--admin-interface-generic-link-hover-color); +} + +.admin-interface .streamfield_app .stream-help-text .stream-help-text__content { + background: var(--admin-interface-module-background-selected-color); + border-radius: var(--admin-interface-module-border-radius); + border: 1px solid rgba(0,0,0,0.1); + padding: 15px; +} + +.admin-interface .streamfield_app .stream-help-text .stream-help-text__content > ul { + margin: 0; + padding: 0; +} + +.admin-interface .streamfield_app .collapse-handler { + user-select: none; + padding: 8px; + padding-right: 0; + margin: 0 0 5px 0; + color: var(--admin-interface-generic-link-color); + text-decoration: none; +} + +.admin-interface .streamfield_app .collapse-handler:hover { + color: var(--admin-interface-generic-link-hover-color); + text-decoration: none; +} + +.admin-interface .streamfield_app .stream-model-block { + position: relative; + box-shadow: none; + border: 1px solid rgba(0,0,0,0.1); + border-radius: var(--admin-interface-module-border-radius); + overflow: hidden; +} + +.admin-interface .streamfield_app .stream-model-block, +.admin-interface .streamfield_app .streamfield-models.collapsed .stream-model-block { + margin-bottom: 10px; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + margin: 0; + padding: 10px 10px 10px 20px; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title span { + font-size: 18px; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle { + position: static; + right: 0; + top: 0; + color: var(--admin-interface-generic-link-color); +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle:hover { + color: var(--admin-interface-generic-link-hover-color); +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle { + display: flex; + justify-content: center; + align-items: center; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move, +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-delete { + display: flex; + justify-content: center; + align-items: center; + width: 40px; + height: 40px; + font-weight: normal; + background: none; + flex-shrink: 0; + color: inherit; + font-size: 16px; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move { + cursor: move; /* fallback if grab cursor is unsupported */ + cursor: grab; + cursor: -moz-grab; + cursor: -webkit-grab; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move:before { + content: "↕"; + + display: block; +} + +.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-delete:before { + content: "×"; + display: block; + font-size: 18px; +} + +.admin-interface .streamfield_app .block-fields > div { + margin-bottom: 15px; +} + +.admin-interface .streamfield_app .stream-model-block .stream-model-block__content { + background-color: #f8f8f8; + padding: 20px; +} + +.admin-interface .streamfield_app .stream-model-block .stream-model-block__content.no-subblocks.abstract-block { + display: none; +} + +.admin-interface .streamfield_app .stream-insert-new-block { + margin-bottom: 20px; +} + +.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button { + color: var(--admin-interface-generic-link-color); + text-decoration: none; +} + +.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button:hover { + color: var(--admin-interface-generic-link-hover-color); + text-decoration: none; +} + +.admin-interface .streamfield_app .stream-insert-new-block ul { + display: block; + width: 100%; + margin: 10px 0 0 0; + padding: 0; + user-select: none; +} + +.admin-interface .streamfield_app .stream-insert-new-block ul li { + display: inline-block; + font-size: 12px; + margin: 0; + padding: 0; +} + +.admin-interface .streamfield_app .stream-btn { + font-weight: normal; + text-decoration: none; + background-color: var(--admin-interface-generic-link-color); + padding: 6px 12px; + border-radius: 4px; +} + +.admin-interface .streamfield_app .stream-btn:hover { + text-decoration: none; + background-color: var(--admin-interface-generic-link-hover-color); +} + +.admin-interface .streamfield_app .stream-insert-new-block ul li .stream-btn { + margin-top: 5px; + margin-left: 5px; +} diff --git a/admin_interface/static/admin_interface/css/third-party/tabbed-admin.css b/admin_interface/static/admin_interface/css/third-party/tabbed-admin.css new file mode 100644 index 00000000..010296c5 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/tabbed-admin.css @@ -0,0 +1,37 @@ +/* +django-tabbed-admin support +https://github.com/omji/django-tabbed-admin +*/ + +/* Hide tabs until ready */ +/* +.admin-interface #tabs ul { + display: none; +} + +.admin-interface #tabs ul.ui-tabs-nav { + display: block; +} +*/ + +.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child { + margin-bottom: 0; +} + +.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child .form-row:last-child { + border-bottom: none; +} + +@media (max-width: 350px){ + .admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .vTextField, + .admin-interface .inline-related .vTextField { + width: 17em; + } +} + +@media (max-width: 767px){ + /* fix horizontal overflow - responsive.css:563 */ + .admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .aligned .form-row > div:not([class]) { + width: 100% !important; + } +} diff --git a/admin_interface/static/admin_interface/css/third-party/tinymce.css b/admin_interface/static/admin_interface/css/third-party/tinymce.css new file mode 100644 index 00000000..76ed1b41 --- /dev/null +++ b/admin_interface/static/admin_interface/css/third-party/tinymce.css @@ -0,0 +1,3 @@ +.admin-interface textarea.tinymce ~ p.help { + margin-top:5px !important; +} diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 1efe5f76..33033614 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -97,27 +97,24 @@ {% endif %} - - - - - - - + + + + + + + + + + + {% if current_lang == 'fa' %} {% endif %} From 4759fdf593c7b716a3acca45f597fbf0e4a20411 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 10:53:26 +0100 Subject: [PATCH 143/232] Move `related-modal.css` to related-modal plugin folder. --- .../admin_interface/{css => related-modal}/related-modal.css | 0 admin_interface/templates/admin/base_site.html | 2 -- admin_interface/templates/admin_interface/related-modal.html | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) rename admin_interface/static/admin_interface/{css => related-modal}/related-modal.css (100%) diff --git a/admin_interface/static/admin_interface/css/related-modal.css b/admin_interface/static/admin_interface/related-modal/related-modal.css similarity index 100% rename from admin_interface/static/admin_interface/css/related-modal.css rename to admin_interface/static/admin_interface/related-modal/related-modal.css diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 33033614..85c5f14f 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -95,8 +95,6 @@ {% endif %} - + {% endif %} From ab5ca9626a11c9b43b683799379e65052d0adc38 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 10:54:20 +0100 Subject: [PATCH 144/232] Remove old `flat-theme` body class. --- admin_interface/templates/admin/base_site.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 85c5f14f..2e3ebc2e 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -139,7 +139,7 @@ {% block bodyclass %} {% get_admin_interface_theme as theme %} -flat-theme admin-interface +admin-interface {% if theme.name %} {{ theme.name|slugify }}-theme {% endif %} {% if theme.foldable_apps %} foldable-apps {% endif %} {% if theme.form_submit_sticky %} sticky-submit {% endif %} From b1361d2bc152cf9e64ed03cd94e6ad5ded3fe004 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 10:59:00 +0100 Subject: [PATCH 145/232] Split `admin-interface-fix.css` CSS file into multiple files for easier debugging. --- .../css/admin-interface-fix.css | 612 ------------------ .../admin_interface/css/admin-interface.css | 4 + .../admin_interface/css/change-form.css | 9 + .../static/admin_interface/css/changelist.css | 43 ++ .../static/admin_interface/css/fieldsets.css | 14 + .../admin_interface/css/file-upload.css | 51 ++ .../static/admin_interface/css/header.css | 51 ++ .../static/admin_interface/css/inlines.css | 105 +++ .../admin_interface/css/list-filter.css | 28 + .../static/admin_interface/css/login.css | 65 ++ .../static/admin_interface/css/modules.css | 12 + .../admin_interface/css/nav-sidebar.css | 78 +++ .../admin_interface/css/object-tools.css | 10 + .../static/admin_interface/css/paginator.css | 33 + .../static/admin_interface/css/widgets.css | 102 +++ .../templates/admin/base_site.html | 41 +- 16 files changed, 626 insertions(+), 632 deletions(-) delete mode 100644 admin_interface/static/admin_interface/css/admin-interface-fix.css create mode 100644 admin_interface/static/admin_interface/css/change-form.css create mode 100644 admin_interface/static/admin_interface/css/changelist.css create mode 100644 admin_interface/static/admin_interface/css/fieldsets.css create mode 100644 admin_interface/static/admin_interface/css/file-upload.css create mode 100644 admin_interface/static/admin_interface/css/header.css create mode 100644 admin_interface/static/admin_interface/css/inlines.css create mode 100644 admin_interface/static/admin_interface/css/list-filter.css create mode 100644 admin_interface/static/admin_interface/css/login.css create mode 100644 admin_interface/static/admin_interface/css/modules.css create mode 100644 admin_interface/static/admin_interface/css/nav-sidebar.css create mode 100644 admin_interface/static/admin_interface/css/object-tools.css create mode 100644 admin_interface/static/admin_interface/css/paginator.css create mode 100644 admin_interface/static/admin_interface/css/widgets.css diff --git a/admin_interface/static/admin_interface/css/admin-interface-fix.css b/admin_interface/static/admin_interface/css/admin-interface-fix.css deleted file mode 100644 index 81859349..00000000 --- a/admin_interface/static/admin_interface/css/admin-interface-fix.css +++ /dev/null @@ -1,612 +0,0 @@ -.admin-interface { - overflow-x: hidden; -} - -/* fix login */ -.admin-interface.login #container { - width: 100%; - max-width: 360px; - margin: 15px auto; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} - -.admin-interface.login #content { - padding: 15px 30px 30px 30px; -} - -@media (min-width:768px){ - .admin-interface.login #container { - margin: 90px auto; - } -} - -.admin-interface.login #header { - min-height: auto; - padding: 10px 30px; - line-height: 30px; - align-items: center; - justify-content: flex-start; -} - -.admin-interface.login #header #branding h1 { - margin-right:0; -} - -.admin-interface.login #header #branding h1 img.logo { - margin-right: 0; -} - -.admin-interface.login #header #branding h1 img.logo+span { - display: block; -} - -.admin-interface.login #login-form { - display: flex; - flex-direction: column; -} - -.admin-interface.login .submit-row { - float: left; - width: 100%; - margin-top: 20px; - padding-top: 0; - padding-left: 0; - text-align: right; -} - -.admin-interface.login .submit-row label { - display: none; -} - -.admin-interface.login .submit-row input[type="submit"] { - width: 100%; - text-transform: uppercase; -} - -.admin-interface.login #footer { - display: none; -} -/* end login fix*/ - -.admin-interface #header { - height: auto; - min-height: 55px; - box-sizing: border-box; - display: flex; - justify-content: space-between; - align-items: center; -} - -@media (max-width:1024px) { - .admin-interface #header { - align-items: start; - } -} - -.admin-interface #branding h1 img.logo { - margin-top:10px; - margin-bottom:10px; - margin-right:15px; - display:inline-block !important; /* override inline display:none; */ -} - -.admin-interface #branding h1 span { - display: inline-block; -} - -.admin-interface #branding h1 img.logo+span { - white-space:nowrap; -} - -.admin-interface #user-tools { - margin-top: 10px; - margin-bottom: 10px; - white-space: nowrap; - align-self: flex-start; -} - -.admin-interface #user-tools br { - display: none; -} -@media (max-width: 768px) { - .admin-interface #user-tools br { - display: block; - } -} - -.admin-interface fieldset.collapse { - border: 1px solid transparent; -} - -.admin-interface fieldset.collapse.collapsed a.collapse-toggle, -.admin-interface fieldset.collapse a.collapse-toggle, -.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle, -.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle { - font-weight: normal; - text-transform: lowercase; - font-size: 12px; - text-decoration: underline; - padding: 0 1px; -} - -@media (min-width: 1024px) { - .admin-interface #changelist .actions .button, - .admin-interface #changelist .actions .action-counter { - margin-left: 8px; - } -} - -.admin-interface #changelist .paginator { - margin-top:-1px; /* merge 2 borders into 1 */ - line-height: 1.5em; - padding-top: 15px; - padding-bottom: 15px; -} - -.admin-interface .paginator a, -.admin-interface .paginator a:link, -.admin-interface .paginator a:visited, -.admin-interface .paginator .this-page { - padding:7px 12px; -} - -.admin-interface .paginator a, -.admin-interface .paginator .this-page { - margin-left:0px; -} - -.admin-interface .paginator .this-page, -.admin-interface .paginator a.end { - margin-right:25px; -} - -.admin-interface .paginator .this-page + a:not(.showall) { - margin-left:-25px; -} - -body.admin-interface .paginator a.showall, -body.admin-interface .paginator a.showall:link, -body.admin-interface .paginator a.showall:visited { - margin-left:20px; -} - -/* fix help text icon on newline */ -.admin-interface .inline-group thead th { - white-space:nowrap; -} - -.admin-interface .inline-group thead th img { - vertical-align: -2px; - margin-left: 5px; -} - -.admin-interface .inline-group .inlinechangelink { - background-size: contain; - padding-left: 15px; - margin-left: 10px; -} - -.admin-interface .file-thumbnail > a { - display: inline-block; -} - -.admin-interface .aligned p.file-upload { - display:table; -} - -.admin-interface form .form-row p.file-upload > a { - margin-right:20px; -} - -.admin-interface form .form-row p.file-upload .clearable-file-input { - display:inline-block; -} - -.admin-interface form .form-row p.file-upload .clearable-file-input label { - padding-bottom:0px; - margin-left:2px; -} - -.admin-interface form .form-row p.file-upload > input[type="file"] { - margin-top: 0px; -} - -@media (max-width:767px){ - - .admin-interface form .form-row p.file-upload { - width: 100%; - } - - .admin-interface form .form-row p.file-upload > a { - margin-right:0px; - display: block; - white-space: pre-wrap; - word-break: break-word; - } - - .admin-interface form .form-row p.file-upload .clearable-file-input { - display: block; - margin-top: 10px; - margin-left: 0; - margin-bottom: -10px; - } - - .admin-interface form .form-row p.file-upload > input[type="file"] { - display: block; - width: auto; - padding: 0px; - } - - /* fix inline horizontal scroll caused by checkbox-row */ - .admin-interface form .form-row > div.checkbox-row { - width: 100%; - } -} - - -/* FIX WIDE FIELDSET HELPS / ERROR MESSAGES */ -.admin-interface form .wide p.help, -.admin-interface form .wide div.help { - padding-left: 50px; -} - -.admin-interface form .wide input + p.help, -.admin-interface form .wide input + div.help { - margin-left: 160px; -} - -@media (max-width:767px){ - .admin-interface form .form-row div.help { - display: block; - width: 100%; - } -} - -.admin-interface form .wide ul.errorlist { - margin-left: 200px; -} - -/* LIST FILTER */ -.admin-interface .module.filtered h2 { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} - -.admin-interface .module.filtered #changelist-filter { - min-width: 240px; -} - -@media (max-width: 1024px) { - .admin-interface .module.filtered #changelist-filter { - min-width: 200px; - } -} - -.admin-interface .module.filtered #changelist-filter h2 { - font-size: 11px; - padding: 10px 15px; -} - -.admin-interface .module.filtered #changelist-filter h2 + h3 { - margin-top: 0px; -} - -.admin-interface .module.filtered #changelist-filter h3 { - margin-top: 12px; - margin-bottom: 12px; -} - -.admin-interface #changelist-form .results { - scrollbar-width: thin; -} - -/* begin fix issue #13 - Datetime widget broken in long inlines */ -.admin-interface p.datetime { - white-space:nowrap; -} -/* end fix */ - -/* begin fix lateral padding to align text with field labels */ -.admin-interface .module h2, -.admin-interface.dashboard .module caption, -.admin-interface.dashboard .module th, -.admin-interface .module.filtered h2, -.admin-interface .inline-group h2, -.admin-interface #nav-sidebar .module caption, -.admin-interface #nav-sidebar .module th { - padding-left: 10px; - padding-right: 10px; -} -/* end fix */ - -/* begin fix restrict tabular-inline horizontal-scroll to inline-group instead of whole page */ -.admin-interface .inline-group[data-inline-type="tabular"] { - overflow-x:auto; -} -/* end fix */ - -/* begin fix stacked-inline margin-bottom in responsive small viewport */ -.admin-interface .inline-group[data-inline-type="stacked"] .module { - margin-bottom:0px; -} -/* end fix */ - -/* begin fix tabular inlines horizontal scroll */ -.admin-interface .inline-related.tabular { - overflow-x: scroll; - overflow-y: hidden; -} -.admin-interface .inline-related.tabular fieldset.module { - display: contents; - width: 100%; - white-space: nowrap; - position: relative; -} -.admin-interface .inline-related.tabular fieldset.module h2 { - position: sticky; - left: 0; -} -.admin-interface .inline-related.tabular fieldset.module table { - scrollbar-width: thin; -} -.admin-interface .inline-related.tabular fieldset.module table tbody tr { - position: relative; -} -/* end fix */ - -.admin-interface .inline-related h3 { - padding:6px 10px; -} - -/* begin fix issue #12 - Inlines bad delete buttons alignement */ -.admin-interface .inline-group .tabular thead th:last-child:not([class]):not([style]) { - text-align:right; -} - -.admin-interface .inline-group .tabular tr td { - vertical-align: top; -} - -.admin-interface .inline-group .tabular tr td.delete { - text-align:right; - padding-right:15px; - vertical-align: top; -} - -.admin-interface .inline-group .tabular tr td input[type="checkbox"] { - margin: 7px 0px; -} - -.admin-interface .inline-group .tabular tr td.delete a.inline-deletelink { - margin-top:4px; - overflow:hidden; - text-indent:9999px; -} -/* end fix */ - -/* top-right buttons color on hover -> just a lighten grey */ -.admin-interface .object-tools a { - color:#FFFFFF; -} -.admin-interface .object-tools a:focus, -.admin-interface .object-tools a:hover, -.admin-interface .object-tools li:focus a, -.admin-interface .object-tools li:hover a { - background-color:#AAAAAA; -} - -/* improve responsive selector */ - -/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector */ -.admin-interface .selector .selector-available select, -.admin-interface .selector .selector-chosen select { - padding: 7px 10px; - display: block; -} - -/* fix [stacked, not-stacked] select options text overflow */ -.admin-interface .selector .selector-available select option, -.admin-interface .selector .selector-chosen select option { - overflow: hidden; - text-overflow: ellipsis; -} - -/* fix [not-stacked] equalize selectors height by adding the height of the .selector-available filter-bar */ -.admin-interface .selector:not(.stacked) .selector-chosen select { - height: calc(46px + 17.2em) !important; -} - -/* fix nav-sidebar (added in django 3.1.0) */ -.admin-interface #toggle-nav-sidebar { - top: 10px; - left: 0; - z-index: 20; - flex: 0 0 30px; - width: 30px; - height: 45px; - margin-top: 10px; - margin-right: -30px; - background-color: #FFFFFF; - font-size: 16px; - border: 1px solid #eaeaea; - border-left: none; - outline: none; - -webkit-box-shadow: 4px 4px 8px -4px #DBDBDB; - -moz-box-shadow: 4px 4px 8px -4px #DBDBDB; - box-shadow: 4px 4px 8px -4px #DBDBDB; - /*transition: left .3s;*/ -} - -.admin-interface .toggle-nav-sidebar::before { - margin-top: -2px; -} - -.admin-interface .main > #nav-sidebar + .content, -.admin-interface .main.shifted > #nav-sidebar + .content { - max-width: 100%; -} - -/* hide nav-sidebar below 1280px to prevent horizontal overflow issues */ -@media (max-width:1279px) { - .admin-interface #nav-sidebar, - .admin-interface #toggle-nav-sidebar { - display: none; - } -} - -.admin-interface #nav-sidebar { - flex: 0 0 360px; - left: -360px; - margin-left: -360px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - padding: 40px 40px 40px 40px; - border-top: none; - border-bottom: none; - border-left: none; - scrollbar-width: thin; - /*transition: left .3s, margin-left .3s;*/ -} - -.admin-interface #nav-filter { - background-color: transparent; - border-radius: 4px; - height: 30px; - margin: 0 0 30px 0; - padding: 5px 6px; - outline-width: initial; -} - -@media (min-width:1280px) { - .admin-interface #main.shifted > #toggle-nav-sidebar { - left: 359px; - } - .admin-interface #main.shifted > #nav-sidebar { - left: 0px; - margin-left: 0; - } - .admin-interface #main:not(.shifted) > .content { - max-width: 100%; - } - .admin-interface.change-list:not(.popup) #main.shifted > #nav-sidebar + .content, - .admin-interface.change-form:not(.popup) #main.shifted > #nav-sidebar + .content { - max-width: calc(100% - 360px); - } -} - -/* fixed related widget and select2 */ -/* begin fix issue #10 - Related widget broken in long tabular inline */ -.admin-interface .related-widget-wrapper { - white-space: nowrap; -} -/* end fix */ - -.admin-interface .related-widget-wrapper select + .related-widget-wrapper-link, -.admin-interface .related-widget-wrapper .select2-container + .related-widget-wrapper-link { - margin-left: 12px !important; -} - -@media (min-width: 768px) { - .admin-interface.change-form select { - min-width: 150px; - } -} - -@media (min-width: 1024px) { - .admin-interface.change-form select { - min-width: 200px; - } -} - -.admin-interface.change-form .inline-related.tabular select { - min-width: auto !important; -} - -/* fixed time widget header border radius */ -.admin-interface .clockbox.module h2 { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} - -/* fix searchbar overriden padding */ -.admin-interface #changelist #changelist-search #searchbar { - padding: 2px 5px 3px 5px; -} - -@media (min-width: 1024px) { - .admin-interface #changelist #changelist-search #searchbar, - .admin-interface #changelist #changelist-search input[type="submit"], - .admin-interface #changelist #changelist-search .quiet { - margin-left: 8px; - } - .admin-interface #changelist #changelist-search label img { - vertical-align: text-top; - margin-right: 0px; - } -} - -@media (max-width: 1024px) { - .admin-interface #changelist #toolbar { - border-top: 1px solid #eee; - border-bottom: 1px solid #eee; - } - /* fixed changelist search size when there are search results and .quiet is visible */ - .admin-interface #changelist-search label img { - margin-top: 2px; - } - .admin-interface #changelist-search .quiet { - margin: 0 0 0 10px; - align-self: center; - flex-basis: content; - } -} - -@media (max-width: 767px) { - /* fixed responsive widgets */ - .admin-interface .aligned.collapsed .form-row { - display: none; - } - - .admin-interface .aligned .form-row > div { - display: flex; - max-width: 100vw; - flex-direction: column; - align-items: flex-start; - } - - .admin-interface .aligned .form-row .help { - margin-left: 0; - } - - .admin-interface .aligned .form-row .checkbox-row label { - margin: 10px 0 0 0; - padding: 0; - } - - .admin-interface .aligned .form-row input[type="file"], - .admin-interface .aligned .form-row input[type="text"], - .admin-interface .aligned .form-row input[type="email"] { - width: 100%; - } - - /* fix textarea horizontal scroll on Firefox */ - .admin-interface .aligned .form-row textarea { - width: 100% !important; - flex: 0 1 auto; - } - - .admin-interface .aligned .form-row .datetime input[type="text"] { - width: 50%; - } - - .admin-interface .aligned .form-row span + .file-upload { - margin-top: 10px; - } - - .admin-interface .aligned .form-row .file-upload input[type="file"] { - margin-top: 5px; - } -} diff --git a/admin_interface/static/admin_interface/css/admin-interface.css b/admin_interface/static/admin_interface/css/admin-interface.css index 31b3a17b..268c1afa 100644 --- a/admin_interface/static/admin_interface/css/admin-interface.css +++ b/admin_interface/static/admin_interface/css/admin-interface.css @@ -42,6 +42,10 @@ } } +.admin-interface { + overflow-x: hidden; +} + .admin-interface #header { background: var(--admin-interface-header-background-color); color: var(--admin-interface-header-text-color); diff --git a/admin_interface/static/admin_interface/css/change-form.css b/admin_interface/static/admin_interface/css/change-form.css new file mode 100644 index 00000000..1db25357 --- /dev/null +++ b/admin_interface/static/admin_interface/css/change-form.css @@ -0,0 +1,9 @@ +@media (min-width: 768px) { + .admin-interface .submit-row { + flex-direction: row-reverse; + } + .admin-interface .submit-row a.deletelink { + margin-left: 0; + margin-right: auto; + } +} diff --git a/admin_interface/static/admin_interface/css/changelist.css b/admin_interface/static/admin_interface/css/changelist.css new file mode 100644 index 00000000..3c1cbcd7 --- /dev/null +++ b/admin_interface/static/admin_interface/css/changelist.css @@ -0,0 +1,43 @@ +@media (min-width: 1024px) { + .admin-interface #changelist .actions .button, + .admin-interface #changelist .actions .action-counter { + margin-left: 8px; + } +} + +.admin-interface #changelist-form .results { + scrollbar-width: thin; +} + +/* fix searchbar overriden padding */ +.admin-interface #changelist #changelist-search #searchbar { + padding: 2px 5px 3px 5px; +} + +@media (min-width: 1024px) { + .admin-interface #changelist #changelist-search #searchbar, + .admin-interface #changelist #changelist-search input[type="submit"], + .admin-interface #changelist #changelist-search .quiet { + margin-left: 8px; + } + .admin-interface #changelist #changelist-search label img { + vertical-align: text-top; + margin-right: 0px; + } +} + +@media (max-width: 1024px) { + .admin-interface #changelist #toolbar { + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + } + /* fixed changelist search size when there are search results and .quiet is visible */ + .admin-interface #changelist-search label img { + margin-top: 2px; + } + .admin-interface #changelist-search .quiet { + margin: 0 0 0 10px; + align-self: center; + flex-basis: content; + } +} diff --git a/admin_interface/static/admin_interface/css/fieldsets.css b/admin_interface/static/admin_interface/css/fieldsets.css new file mode 100644 index 00000000..dc7fabe2 --- /dev/null +++ b/admin_interface/static/admin_interface/css/fieldsets.css @@ -0,0 +1,14 @@ +.admin-interface fieldset.collapse { + border: 1px solid transparent; +} + +.admin-interface fieldset.collapse.collapsed a.collapse-toggle, +.admin-interface fieldset.collapse a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module a.collapse-toggle, +.admin-interface .inline-group .inline-related fieldset.module.collapsed a.collapse-toggle { + font-weight: normal; + text-transform: lowercase; + font-size: 12px; + text-decoration: underline; + padding: 0 1px; +} diff --git a/admin_interface/static/admin_interface/css/file-upload.css b/admin_interface/static/admin_interface/css/file-upload.css new file mode 100644 index 00000000..1df3dc9d --- /dev/null +++ b/admin_interface/static/admin_interface/css/file-upload.css @@ -0,0 +1,51 @@ +.admin-interface .file-thumbnail > a { + display: inline-block; +} + +.admin-interface .aligned p.file-upload { + display: table; +} + +.admin-interface form .form-row p.file-upload > a { + margin-right: 20px; +} + +.admin-interface form .form-row p.file-upload .clearable-file-input { + display: inline-block; +} + +.admin-interface form .form-row p.file-upload .clearable-file-input label { + padding-bottom: 0px; + margin-left: 5px; +} + +.admin-interface form .form-row p.file-upload > input[type="file"] { + margin-top: 0px; +} + +@media (max-width:767px){ + + .admin-interface form .form-row p.file-upload { + width: 100%; + } + + .admin-interface form .form-row p.file-upload > a { + margin-right: 0px; + display: block; + white-space: pre-wrap; + word-break: break-word; + } + + .admin-interface form .form-row p.file-upload .clearable-file-input { + display: block; + margin-top: 10px; + margin-left: 0; + margin-bottom: -10px; + } + + .admin-interface form .form-row p.file-upload > input[type="file"] { + display: block; + width: auto; + padding: 0px; + } +} diff --git a/admin_interface/static/admin_interface/css/header.css b/admin_interface/static/admin_interface/css/header.css new file mode 100644 index 00000000..c4019d92 --- /dev/null +++ b/admin_interface/static/admin_interface/css/header.css @@ -0,0 +1,51 @@ +.admin-interface #header { + height: auto; + min-height: 55px; + box-sizing: border-box; + display: flex; + justify-content: space-between; + align-items: center; +} + +@media (max-width:1024px) { + .admin-interface #header { + align-items: start; + } +} + +.admin-interface #branding h1 img.logo { + margin-top: 10px; + margin-bottom: 10px; + margin-right: 15px; + display: inline-block !important; /* override inline display:none; */ +} + +.admin-interface #branding h1 span { + display: inline-block; +} + +.admin-interface #branding h1 img.logo+span { + white-space: nowrap; +} + +.admin-interface #user-tools { + margin-top: 10px; + margin-bottom: 10px; + white-space: nowrap; + align-self: flex-start; +} + +.admin-interface #user-tools br { + display: none; +} + +@media (max-width: 768px) { + .admin-interface #user-tools br { + display: block; + } +} + +/* hide theme toggle button until dark theme will be supported */ +.admin-interface #user-tools button.theme-toggle { + display: none; +} diff --git a/admin_interface/static/admin_interface/css/inlines.css b/admin_interface/static/admin_interface/css/inlines.css new file mode 100644 index 00000000..1ebc7306 --- /dev/null +++ b/admin_interface/static/admin_interface/css/inlines.css @@ -0,0 +1,105 @@ +/* begin fix help text icon on newline */ +.admin-interface .inline-group thead th { + white-space:nowrap; +} + +.admin-interface .inline-group thead th img { + vertical-align: -2px; + margin-left: 5px; +} + +.admin-interface .inline-group .inlinechangelink { + margin-left: 10px; +} + +.admin-interface .inline-group .inline-related.tabular .inlinechangelink { + background-size: contain; +} +/* end fix */ + +/* begin fix restrict tabular-inline horizontal-scroll to inline-group instead of whole page */ +.admin-interface .inline-group[data-inline-type="tabular"] { + overflow-x: auto; +} +/* end fix */ + +/* begin fix stacked-inline margin-bottom in responsive small viewport */ +.admin-interface .inline-group[data-inline-type="stacked"] .module { + margin-bottom: 0px; +} +/* end fix */ + +/* begin fix tabular inlines horizontal scroll */ +.admin-interface .inline-related.tabular { + overflow-x: scroll; + overflow-y: hidden; +} +.admin-interface .inline-related.tabular fieldset.module { + display: contents; + width: 100%; + white-space: nowrap; + position: relative; +} +.admin-interface .inline-related.tabular fieldset.module h2 { + position: sticky; + left: 0; +} +.admin-interface .inline-related.tabular fieldset.module table { + scrollbar-width: thin; +} +.admin-interface .inline-related.tabular fieldset.module table tbody tr { + position: relative; +} +/* end fix */ + +.admin-interface .inline-related h3 { + padding: 6px 10px; +} + +/* begin fix issue #12 - Inlines bad delete buttons alignement */ +.admin-interface .inline-group .tabular thead th:last-child:not([class]):not([style]) { + text-align: right; +} + +.admin-interface .inline-group .tabular tr td { + vertical-align: top; +} + +.admin-interface .inline-group .tabular tr td.delete { + text-align: right; + padding-right: 15px; + vertical-align: top; +} + +.admin-interface .inline-group .tabular tr td input[type="checkbox"] { + margin: 7px 0px; +} + +.admin-interface .inline-group .tabular tr td.delete a.inline-deletelink { + margin-top: 4px; + overflow: hidden; + text-indent: 9999px; +} +/* end fix */ + +/* begin fix remove button at the end od dynamically added inline rows */ +.admin-interface .inline-group .tabular tr td:not(.delete) * + div:has(> a.inline-deletelink) { + display: inline-block; + margin-bottom: -3px; + margin-left: 10px; +} +/* end fix */ + +/* begin fix issue #13 - Datetime widget broken in long inlines */ +.admin-interface .inline-group .inline-related p.datetime { + white-space: nowrap; +} +/* end fix */ + +/* begin fix inline horizontal scroll caused by checkbox-row */ +@media (max-width:767px){ + .admin-interface form .form-row > div.checkbox-row { + width: 100%; + } +} +/* end fix */ diff --git a/admin_interface/static/admin_interface/css/list-filter.css b/admin_interface/static/admin_interface/css/list-filter.css new file mode 100644 index 00000000..113abdb3 --- /dev/null +++ b/admin_interface/static/admin_interface/css/list-filter.css @@ -0,0 +1,28 @@ +.admin-interface .module.filtered h2 { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.admin-interface .module.filtered #changelist-filter { + min-width: 240px; +} + +@media (max-width: 1024px) { + .admin-interface .module.filtered #changelist-filter { + min-width: 200px; + } +} + +.admin-interface .module.filtered #changelist-filter h2 { + font-size: 11px; + padding: 10px 15px; +} + +.admin-interface .module.filtered #changelist-filter h2 + h3 { + margin-top: 0px; +} + +.admin-interface .module.filtered #changelist-filter h3 { + margin-top: 12px; + margin-bottom: 12px; +} diff --git a/admin_interface/static/admin_interface/css/login.css b/admin_interface/static/admin_interface/css/login.css new file mode 100644 index 00000000..31143737 --- /dev/null +++ b/admin_interface/static/admin_interface/css/login.css @@ -0,0 +1,65 @@ +.admin-interface.login #container { + width: 100%; + max-width: 360px; + margin: 15px auto; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +.admin-interface.login #content { + padding: 15px 30px 30px 30px; +} + +@media (min-width:768px){ + .admin-interface.login #container { + margin: 90px auto; + } +} + +.admin-interface.login #header { + min-height: auto; + padding: 10px 30px; + line-height: 30px; + align-items: center; + justify-content: flex-start; +} + +.admin-interface.login #header #branding h1 { + margin-right:0; +} + +.admin-interface.login #header #branding h1 img.logo { + margin-right: 0; +} + +.admin-interface.login #header #branding h1 img.logo+span { + display: block; +} + +.admin-interface.login #login-form { + display: flex; + flex-direction: column; +} + +.admin-interface.login .submit-row { + float: left; + width: 100%; + margin-top: 20px; + padding-top: 0; + padding-left: 0; + text-align: right; +} + +.admin-interface.login .submit-row label { + display: none; +} + +.admin-interface.login .submit-row input[type="submit"] { + width: 100%; + text-transform: uppercase; +} + +.admin-interface.login #footer { + display: none; +} diff --git a/admin_interface/static/admin_interface/css/modules.css b/admin_interface/static/admin_interface/css/modules.css new file mode 100644 index 00000000..62081813 --- /dev/null +++ b/admin_interface/static/admin_interface/css/modules.css @@ -0,0 +1,12 @@ +/* begin fix lateral padding to align text with field labels */ +.admin-interface .module h2, +.admin-interface.dashboard .module caption, +.admin-interface.dashboard .module th, +.admin-interface .module.filtered h2, +.admin-interface .inline-group h2, +.admin-interface #nav-sidebar .module caption, +.admin-interface #nav-sidebar .module th { + padding-left: 10px; + padding-right: 10px; +} +/* end fix */ diff --git a/admin_interface/static/admin_interface/css/nav-sidebar.css b/admin_interface/static/admin_interface/css/nav-sidebar.css new file mode 100644 index 00000000..14356e36 --- /dev/null +++ b/admin_interface/static/admin_interface/css/nav-sidebar.css @@ -0,0 +1,78 @@ +/* fix nav-sidebar (added in django 3.1.0) */ +.admin-interface #toggle-nav-sidebar { + top: 10px; + left: 0; + z-index: 20; + flex: 0 0 30px; + width: 30px; + height: 45px; + margin-top: 10px; + margin-right: -30px; + background-color: #FFFFFF; + font-size: 16px; + border: 1px solid #eaeaea; + border-left: none; + outline: none; + -webkit-box-shadow: 4px 4px 8px -4px #DBDBDB; + -moz-box-shadow: 4px 4px 8px -4px #DBDBDB; + box-shadow: 4px 4px 8px -4px #DBDBDB; + /*transition: left .3s;*/ +} + +.admin-interface .toggle-nav-sidebar::before { + margin-top: -2px; +} + +.admin-interface .main > #nav-sidebar + .content, +.admin-interface .main.shifted > #nav-sidebar + .content { + max-width: 100%; +} + +/* hide nav-sidebar below 1280px to prevent horizontal overflow issues */ +@media (max-width:1279px) { + .admin-interface #nav-sidebar, + .admin-interface #toggle-nav-sidebar { + display: none; + } +} + +.admin-interface #nav-sidebar { + flex: 0 0 360px; + left: -360px; + margin-left: -360px; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + padding: 40px 40px 40px 40px; + border-top: none; + border-bottom: none; + border-left: none; + scrollbar-width: thin; + /*transition: left .3s, margin-left .3s;*/ +} + +.admin-interface #nav-filter { + background-color: transparent; + border-radius: 4px; + height: 30px; + margin: 0 0 30px 0; + padding: 5px 6px; + outline-width: initial; +} + +@media (min-width:1280px) { + .admin-interface #main.shifted > #toggle-nav-sidebar { + left: 359px; + } + .admin-interface #main.shifted > #nav-sidebar { + left: 0px; + margin-left: 0; + } + .admin-interface #main:not(.shifted) > .content { + max-width: 100%; + } + .admin-interface.change-list:not(.popup) #main.shifted > #nav-sidebar + .content, + .admin-interface.change-form:not(.popup) #main.shifted > #nav-sidebar + .content { + max-width: calc(100% - 360px); + } +} diff --git a/admin_interface/static/admin_interface/css/object-tools.css b/admin_interface/static/admin_interface/css/object-tools.css new file mode 100644 index 00000000..4e5aa1c1 --- /dev/null +++ b/admin_interface/static/admin_interface/css/object-tools.css @@ -0,0 +1,10 @@ +/* top-right buttons color on hover -> just a lighten grey */ +.admin-interface .object-tools a { + color: #FFFFFF; +} +.admin-interface .object-tools a:focus, +.admin-interface .object-tools a:hover, +.admin-interface .object-tools li:focus a, +.admin-interface .object-tools li:hover a { + background-color: #AAAAAA; +} diff --git a/admin_interface/static/admin_interface/css/paginator.css b/admin_interface/static/admin_interface/css/paginator.css new file mode 100644 index 00000000..fc69d3ee --- /dev/null +++ b/admin_interface/static/admin_interface/css/paginator.css @@ -0,0 +1,33 @@ +.admin-interface #changelist .paginator { + margin-top: -1px; /* merge 2 borders into 1 */ + line-height: 1.5em; + padding-top: 15px; + padding-bottom: 15px; +} + +.admin-interface .paginator a, +.admin-interface .paginator a:link, +.admin-interface .paginator a:visited, +.admin-interface .paginator .this-page { + padding: 7px 12px; +} + +.admin-interface .paginator a, +.admin-interface .paginator .this-page { + margin-left: 0px; +} + +.admin-interface .paginator .this-page, +.admin-interface .paginator a.end { + margin-right: 25px; +} + +.admin-interface .paginator .this-page + a:not(.showall) { + margin-left: -25px; +} + +body.admin-interface .paginator a.showall, +body.admin-interface .paginator a.showall:link, +body.admin-interface .paginator a.showall:visited { + margin-left: 20px; +} diff --git a/admin_interface/static/admin_interface/css/widgets.css b/admin_interface/static/admin_interface/css/widgets.css new file mode 100644 index 00000000..73b76cab --- /dev/null +++ b/admin_interface/static/admin_interface/css/widgets.css @@ -0,0 +1,102 @@ +/* fix generic flex container */ +.admin-interface .flex-container { + width: 100%; +} +.admin-interface .flex-container.checkbox-row { + align-items: center; +} +.admin-interface .flex-container.checkbox-row label.vCheckboxLabel { + margin-top: 0 !important; + padding-left: 5px !important; + padding-bottom: 0; +} +/* end-fix */ + +/* fixed time widget header border radius */ +.admin-interface .clockbox.module h2 { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +/* end-fix */ + +/* fixed related widget and select2 */ +/* begin fix issue #10 - Related widget broken in long tabular inline */ +.admin-interface .related-widget-wrapper { + white-space: nowrap; +} +/* end fix */ + +.admin-interface .related-widget-wrapper select + .related-widget-wrapper-link, +.admin-interface .related-widget-wrapper .select2-container + .related-widget-wrapper-link { + margin-left: 12px !important; +} + + +/* improve responsive selector */ + +/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector */ +.admin-interface .selector .selector-available select, +.admin-interface .selector .selector-chosen select { + padding: 7px 10px; + display: block; +} + +/* fix [stacked, not-stacked] select options text overflow */ +.admin-interface .selector .selector-available select option, +.admin-interface .selector .selector-chosen select option { + overflow: hidden; + text-overflow: ellipsis; +} + +/* fix [not-stacked] equalize selectors height by adding the height of the .selector-available filter-bar */ +.admin-interface .selector:not(.stacked) .selector-chosen select { + height: calc(46px + 17.2em) !important; +} + +@media (max-width: 767px) { + /* fixed responsive widgets */ + .admin-interface .aligned.collapsed .form-row { + display: none; + } + + .admin-interface .aligned .form-row > div { + display: flex; + width: 100%; + max-width: 100vw; + flex-direction: column; + align-items: flex-start; + } + + .admin-interface .aligned .form-row .help { + margin-left: 0; + } + + .admin-interface .aligned .form-row .checkbox-row label { + margin: 10px 0 0 0; + padding: 0; + } + + .admin-interface .aligned .form-row input[type="file"], + .admin-interface .aligned .form-row input[type="text"], + .admin-interface .aligned .form-row input[type="email"] { + width: 100%; + } + + /* fix textarea horizontal scroll on Firefox */ + .admin-interface .aligned .form-row textarea { + width: 100% !important; + flex: 0 1 auto; + } + + .admin-interface .aligned .form-row .datetime input[type="text"] { + width: 50%; + } + + .admin-interface .aligned .form-row span + .file-upload { + margin-top: 10px; + } + + .admin-interface .aligned .form-row .file-upload input[type="file"] { + margin-top: 5px; + } +} diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index 2e3ebc2e..e4b5b261 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -79,28 +79,29 @@ {% endif %} } - - - - - - + + + + + + + + + + + + + + + + {% if not theme.recent_actions_visible %} - + {% endif %} - - - + + + + From b5980b85e6b5da02012b40c67ed610d2b8770e6b Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 10:59:33 +0100 Subject: [PATCH 146/232] Remove old third-party compatibility CSS files. --- .../static/admin_interface/css/ckeditor.css | 126 ----------- .../admin_interface/css/form-controls.css | 95 --------- .../admin_interface/css/import-export.css | 7 - .../admin_interface/css/json-widget.css | 27 --- .../admin_interface/css/modeltranslation.css | 17 -- .../admin_interface/css/rangefilter.css | 25 --- .../admin_interface/css/sorl-thumbnail.css | 67 ------ .../admin_interface/css/streamfield.css | 200 ------------------ .../admin_interface/css/tabbed-admin.css | 37 ---- .../static/admin_interface/css/tinymce.css | 3 - 10 files changed, 604 deletions(-) delete mode 100644 admin_interface/static/admin_interface/css/ckeditor.css delete mode 100644 admin_interface/static/admin_interface/css/form-controls.css delete mode 100644 admin_interface/static/admin_interface/css/import-export.css delete mode 100644 admin_interface/static/admin_interface/css/json-widget.css delete mode 100644 admin_interface/static/admin_interface/css/modeltranslation.css delete mode 100644 admin_interface/static/admin_interface/css/rangefilter.css delete mode 100644 admin_interface/static/admin_interface/css/sorl-thumbnail.css delete mode 100644 admin_interface/static/admin_interface/css/streamfield.css delete mode 100644 admin_interface/static/admin_interface/css/tabbed-admin.css delete mode 100644 admin_interface/static/admin_interface/css/tinymce.css diff --git a/admin_interface/static/admin_interface/css/ckeditor.css b/admin_interface/static/admin_interface/css/ckeditor.css deleted file mode 100644 index 952120cb..00000000 --- a/admin_interface/static/admin_interface/css/ckeditor.css +++ /dev/null @@ -1,126 +0,0 @@ -/* -ckeditor + light theme -https://github.com/Ikimea/ckeditor-light-theme -*/ - -.admin-interface .cke { - border: none; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} - -.admin-interface .cke_inner, -.admin-interface .cke_wysiwyg_frame { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} - -.admin-interface .cke_inner { - border: 1px solid #CCCCCC; -} - -.admin-interface .cke_chrome { - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.admin-interface .cke_top { - background: #f8f8f8; - border-top: none; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #EEEEEE; - padding-left: 10px; - padding-right: 10px; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.admin-interface .cke_toolgroup { - background: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.admin-interface .cke_bottom { - background: #f8f8f8; - border-top: 1px solid #EEEEEE; - - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.admin-interface .cke_source { - padding: 13px 15px; - box-sizing: border-box; -} - -.admin-interface a.cke_button, -.admin-interface a.cke_button:active, -.admin-interface a.cke_button:hover, -.admin-interface a.cke_button:focus { - box-shadow: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - background-image: none; - border-radius: 4px; - border: none; -} - -.admin-interface a.cke_button:active, -.admin-interface a.cke_button:hover, -.admin-interface a.cke_button:focus { - background-color: #E8E8E8 !important; -} - -.admin-interface a.cke_button.cke_button_on { - background-color: #CCCCCC !important; -} - -.admin-interface a.cke_button.cke_button_disabled { - background-color: transparent !important; -} - -.admin-interface .cke_resizer { - border-color: transparent #666666 transparent transparent; -} - -@media (max-width: 767px){ - - .admin-interface .django-ckeditor-widget, - .admin-interface .cke { - width: 100% !important; - } - - .admin-interface .cke_top { - padding-left: 10px; - padding-right: 10px; - } - - .admin-interface .cke_toolbar { - height: auto; - } - - .admin-interface .cke_contents { - height: auto; - } - - .admin-interface .tabular .django-ckeditor-widget, - .admin-interface .tabular .cke { - width: 400px !important; - } - - .admin-interface .tabular .cke_contents { - height: 90px !important; - } -} diff --git a/admin_interface/static/admin_interface/css/form-controls.css b/admin_interface/static/admin_interface/css/form-controls.css deleted file mode 100644 index 43073670..00000000 --- a/admin_interface/static/admin_interface/css/form-controls.css +++ /dev/null @@ -1,95 +0,0 @@ -/* sticky pagination */ - -.admin-interface.sticky-pagination.change-list #content-main { - padding-bottom: 4.375rem; -} - -.admin-interface.sticky-pagination.change-list .paginator { - width: 100%; - position: fixed; - bottom: 0; - right: 0; - z-index: 40; - box-sizing: border-box; - padding-left: 15px; - padding-right: 15px; - white-space: nowrap; - text-overflow: ellipsis; - border-radius: 0; - border-top: 1px solid #EEEEEE !important; - border-bottom: none; - margin: 0; -} - -.admin-interface.sticky-pagination.change-list.popup .paginator { - padding-left: 20px; - padding-right: 20px; -} - -@media (min-width:768px) { - .admin-interface.sticky-pagination.change-list:not(.popup) .paginator { - padding-left: 30px; - padding-right: 30px; - } -} - -@media (min-width:1024px) { - .admin-interface.sticky-pagination.change-list:not(.popup) .paginator { - padding-left: 40px; - padding-right: 40px; - } -} - -@media (min-width:1280px) { - .admin-interface.sticky-pagination.change-list:not(.popup) #main.shifted > #nav-sidebar + .content .paginator { - width: calc(100% - 360px); - } -} - -/* sticky submit */ - -@media (min-width:768px) { - .admin-interface.sticky-submit.change-form #content-main { - padding-bottom: 4.375rem; - } - - .admin-interface.sticky-submit.change-form .submit-row:last-of-type { - width: 100%; - position: fixed; - bottom: 0; - right: 0; - z-index: 40; - box-sizing: border-box; - padding-left: 15px; - padding-right: 15px; - white-space: nowrap; - text-overflow: ellipsis; - border-radius: 0; - border-top: 1px solid #EEEEEE; - border-bottom: none !important; - margin: 0; - } - - .admin-interface.sticky-submit.change-form.popup .submit-row:last-of-type { - padding-left: 20px; - padding-right: 20px; - } - - .admin-interface.sticky-submit.change-form:not(.popup) .submit-row:last-of-type { - padding-left: 30px; - padding-right: 30px; - } -} - -@media (min-width:1024px) { - .admin-interface.sticky-submit.change-form:not(.popup) .submit-row:last-of-type { - padding-left: 40px; - padding-right: 40px; - } -} - -@media (min-width:1280px) { - .admin-interface.sticky-submit.change-form:not(.popup) #main.shifted > #nav-sidebar + .content .submit-row:last-of-type { - width: calc(100% - 359px); - } -} diff --git a/admin_interface/static/admin_interface/css/import-export.css b/admin_interface/static/admin_interface/css/import-export.css deleted file mode 100644 index 8ea0a092..00000000 --- a/admin_interface/static/admin_interface/css/import-export.css +++ /dev/null @@ -1,7 +0,0 @@ -/* Fix left/right scrolling broken with django-import-export #165 */ -.admin-interface table.import-preview { - display: block; - width: 100%; - max-width: 100%; - overflow: auto; -} diff --git a/admin_interface/static/admin_interface/css/json-widget.css b/admin_interface/static/admin_interface/css/json-widget.css deleted file mode 100644 index e0a999d1..00000000 --- a/admin_interface/static/admin_interface/css/json-widget.css +++ /dev/null @@ -1,27 +0,0 @@ -/* -django-json-widget support -https://github.com/jmrivas86/django-json-widget -*/ - -.admin-interface div.jsoneditor { - border: 1px solid var(--admin-interface-module-background-color); - border-radius: var(--admin-interface-jsoneditor-border-radius); - overflow: var(--admin-interface-jsoneditor-overflow); -} - -.admin-interface div.jsoneditor-menu { - background-color: var(--admin-interface-module-background-color); - border-bottom: 1px solid var(--admin-interface-module-background-color); -} - -.admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy { - color: var(--admin-interface-module-link-color); -} - -.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected, -.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus, -.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover { - background-color: var(--admin-interface-module-background-selected-color); - color: #000000; - font-weight: bold; -} diff --git a/admin_interface/static/admin_interface/css/modeltranslation.css b/admin_interface/static/admin_interface/css/modeltranslation.css deleted file mode 100644 index 9e1890b3..00000000 --- a/admin_interface/static/admin_interface/css/modeltranslation.css +++ /dev/null @@ -1,17 +0,0 @@ -/* -django-modeltranslation support -https://github.com/deschler/django-modeltranslation -*/ - -.admin-interface #content h1 select { - text-transform: uppercase; - margin-left: 15px; - min-width: 50px; -} - -.admin-interface .ui-tabs .ui-tabs-panel[id^=tab_id_] { - border: none; - border-top: 1px solid #eeeeee; - padding: 0; - margin-bottom: 0; -} diff --git a/admin_interface/static/admin_interface/css/rangefilter.css b/admin_interface/static/admin_interface/css/rangefilter.css deleted file mode 100644 index 25b4f0ba..00000000 --- a/admin_interface/static/admin_interface/css/rangefilter.css +++ /dev/null @@ -1,25 +0,0 @@ -.admin-interface #changelist-filter .admindatefilter { - border-bottom: 1px solid var(--hairline-color); -} - -.admin-interface #changelist-filter .admindatefilter .button, -.admin-interface #changelist-filter .admindatefilter .submit-row input, -.admin-interface #changelist-filter .admindatefilter a.button, -.admin-interface #changelist-filter .admindatefilter input[type="submit"], -.admin-interface #changelist-filter .admindatefilter input[type="button"], -.admin-interface #changelist-filter .admindatefilter input[type="reset"] { - background: var(--admin-interface-module-background-color); - color: var(--admin-interface-module-link-color); - padding: 6px 10px; - font-size: 12px; - margin-right: 4px; -} - -.admin-interface #changelist-filter .admindatefilter .button:hover, -.admin-interface #changelist-filter .admindatefilter .submit-row input:hover, -.admin-interface #changelist-filter .admindatefilter a.button:hover, -.admin-interface #changelist-filter .admindatefilter input[type="submit"]:hover, -.admin-interface #changelist-filter .admindatefilter input[type="button"]:hover, -.admin-interface #changelist-filter .admindatefilter input[type="reset"]:hover { - color: var(--admin-interface-module-link-hover-color); -} diff --git a/admin_interface/static/admin_interface/css/sorl-thumbnail.css b/admin_interface/static/admin_interface/css/sorl-thumbnail.css deleted file mode 100644 index 44c61909..00000000 --- a/admin_interface/static/admin_interface/css/sorl-thumbnail.css +++ /dev/null @@ -1,67 +0,0 @@ -/* -sorl-thumbnail - improved AdminImageMixin widget layout -https://github.com/mariocesar/sorl-thumbnail -*/ - -.admin-interface a.thumbnail + a { - font-weight: normal; -} - -.admin-interface a.thumbnail + a + input[type="checkbox"] { - margin: 10px 0px 10px 18px; -} - -@media (max-width: 767px){ - .admin-interface a.thumbnail + a { - display: block; - margin-top: 3px; - white-space: pre-wrap; - word-break: break-word; - } - .admin-interface a.thumbnail + a + input[type="checkbox"] { - margin: 15px 0; - } -} - -.admin-interface a.thumbnail ~ label { - color: #333; - font-size: 11px; - display: inline; - float: none; - margin-left: 2px; -} - -.admin-interface.change-form div[style="float:left"] { - font-size: 11px; - font-weight: bold; - color: #666; - margin-bottom: 5px; -} - -@media (max-width: 767px){ - .admin-interface.change-form div[style="float:left"] { - font-size: 12px; - width: 100%; - } -} - -.admin-interface .aligned .form-row a.thumbnail ~ input[type="file"] { - margin-top: 0px; -} - -@media (max-width:767px){ - .admin-interface .aligned .form-row a.thumbnail ~ input[type="file"] { - width: auto; - padding: 0px; - display: block; - margin-top: 3px; - } - - .admin-interface div[style="float:left"] { - margin-bottom: 0px; - } - - .admin-interface div[style="float:left"] + div.help { - margin-top: 0px !important; - } -} diff --git a/admin_interface/static/admin_interface/css/streamfield.css b/admin_interface/static/admin_interface/css/streamfield.css deleted file mode 100644 index 71ce2dbe..00000000 --- a/admin_interface/static/admin_interface/css/streamfield.css +++ /dev/null @@ -1,200 +0,0 @@ -/* -django-streamfield support -https://github.com/raagin/django-streamfield/ -*/ - -.admin-interface .form-row.field-stream { - margin: 0; - padding: 0; - border-bottom: none; -} - -.admin-interface .form-row.field-stream label[for=id_stream] { - display: none; -} - -.admin-interface .streamfield_app { - clear: both; - width: 100%; -} - -.admin-interface .streamfield_app .stream-help-text { - margin-bottom: 15px; - display: flex; - flex-direction: column; - clear: both; -} - -.admin-interface .streamfield_app .stream-help-text .stream-help-text__title { - align-self: flex-end; - user-select: none; - padding: 8px; - padding-right: 0; - color: var(--admin-interface-generic-link-color); -} - -.admin-interface .streamfield_app .stream-help-text .stream-help-text__title:hover { - color: var(--admin-interface-generic-link-hover-color); -} - -.admin-interface .streamfield_app .stream-help-text .stream-help-text__content { - background: var(--admin-interface-module-background-selected-color); - border-radius: var(--admin-interface-module-border-radius); - border: 1px solid rgba(0,0,0,0.1); - padding: 15px; -} - -.admin-interface .streamfield_app .stream-help-text .stream-help-text__content > ul { - margin: 0; - padding: 0; -} - -.admin-interface .streamfield_app .collapse-handler { - user-select: none; - padding: 8px; - padding-right: 0; - margin: 0 0 5px 0; - color: var(--admin-interface-generic-link-color); - text-decoration: none; -} - -.admin-interface .streamfield_app .collapse-handler:hover { - color: var(--admin-interface-generic-link-hover-color); - text-decoration: none; -} - -.admin-interface .streamfield_app .stream-model-block { - position: relative; - box-shadow: none; - border: 1px solid rgba(0,0,0,0.1); - border-radius: var(--admin-interface-module-border-radius); - overflow: hidden; -} - -.admin-interface .streamfield_app .stream-model-block, -.admin-interface .streamfield_app .streamfield-models.collapsed .stream-model-block { - margin-bottom: 10px; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - margin: 0; - padding: 10px 10px 10px 20px; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title span { - font-size: 18px; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle { - position: static; - right: 0; - top: 0; - color: var(--admin-interface-generic-link-color); -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle:hover { - color: var(--admin-interface-generic-link-hover-color); -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle { - display: flex; - justify-content: center; - align-items: center; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move, -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-delete { - display: flex; - justify-content: center; - align-items: center; - width: 40px; - height: 40px; - font-weight: normal; - background: none; - flex-shrink: 0; - color: inherit; - font-size: 16px; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move { - cursor: move; /* fallback if grab cursor is unsupported */ - cursor: grab; - cursor: -moz-grab; - cursor: -webkit-grab; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-move:before { - content: "↕"; - - display: block; -} - -.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block-handle .block-delete:before { - content: "×"; - display: block; - font-size: 18px; -} - -.admin-interface .streamfield_app .block-fields > div { - margin-bottom: 15px; -} - -.admin-interface .streamfield_app .stream-model-block .stream-model-block__content { - background-color: #f8f8f8; - padding: 20px; -} - -.admin-interface .streamfield_app .stream-model-block .stream-model-block__content.no-subblocks.abstract-block { - display: none; -} - -.admin-interface .streamfield_app .stream-insert-new-block { - margin-bottom: 20px; -} - -.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button { - color: var(--admin-interface-generic-link-color); - text-decoration: none; -} - -.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button:hover { - color: var(--admin-interface-generic-link-hover-color); - text-decoration: none; -} - -.admin-interface .streamfield_app .stream-insert-new-block ul { - display: block; - width: 100%; - margin: 10px 0 0 0; - padding: 0; - user-select: none; -} - -.admin-interface .streamfield_app .stream-insert-new-block ul li { - display: inline-block; - font-size: 12px; - margin: 0; - padding: 0; -} - -.admin-interface .streamfield_app .stream-btn { - font-weight: normal; - text-decoration: none; - background-color: var(--admin-interface-generic-link-color); - padding: 6px 12px; - border-radius: 4px; -} - -.admin-interface .streamfield_app .stream-btn:hover { - text-decoration: none; - background-color: var(--admin-interface-generic-link-hover-color); -} - -.admin-interface .streamfield_app .stream-insert-new-block ul li .stream-btn { - margin-top: 5px; - margin-left: 5px; -} diff --git a/admin_interface/static/admin_interface/css/tabbed-admin.css b/admin_interface/static/admin_interface/css/tabbed-admin.css deleted file mode 100644 index 010296c5..00000000 --- a/admin_interface/static/admin_interface/css/tabbed-admin.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -django-tabbed-admin support -https://github.com/omji/django-tabbed-admin -*/ - -/* Hide tabs until ready */ -/* -.admin-interface #tabs ul { - display: none; -} - -.admin-interface #tabs ul.ui-tabs-nav { - display: block; -} -*/ - -.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child { - margin-bottom: 0; -} - -.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child .form-row:last-child { - border-bottom: none; -} - -@media (max-width: 350px){ - .admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .vTextField, - .admin-interface .inline-related .vTextField { - width: 17em; - } -} - -@media (max-width: 767px){ - /* fix horizontal overflow - responsive.css:563 */ - .admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .aligned .form-row > div:not([class]) { - width: 100% !important; - } -} diff --git a/admin_interface/static/admin_interface/css/tinymce.css b/admin_interface/static/admin_interface/css/tinymce.css deleted file mode 100644 index 76ed1b41..00000000 --- a/admin_interface/static/admin_interface/css/tinymce.css +++ /dev/null @@ -1,3 +0,0 @@ -.admin-interface textarea.tinymce ~ p.help { - margin-top:5px !important; -} From 6dbe8fec0fbc9e9944ec44e38ae3531325f187da Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 21 Dec 2023 11:00:59 +0100 Subject: [PATCH 147/232] Remove `type="text/css"` and `type="text/javascript"` attributes. --- admin_interface/templates/admin/base_site.html | 8 ++++---- admin_interface/templates/admin/change_form.html | 2 +- admin_interface/templates/admin/popup_response.html | 3 +-- .../templates/admin_interface/collapsible-inlines.html | 2 +- admin_interface/templates/admin_interface/favicon.html | 4 ++-- .../templates/admin_interface/foldable-apps.html | 4 ++-- .../templates/admin_interface/related-modal.html | 6 +++--- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/admin_interface/templates/admin/base_site.html b/admin_interface/templates/admin/base_site.html index e4b5b261..6d3f48c6 100644 --- a/admin_interface/templates/admin/base_site.html +++ b/admin_interface/templates/admin/base_site.html @@ -10,7 +10,7 @@ {% get_admin_interface_theme as theme %} {% get_admin_interface_nocache as version_md5_cache %} {% get_current_language as current_lang %} -