Skip to content
Snippets Groups Projects
Commit a4a81b34 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Merge branch 'master' into 'renovate/flake8-isort-3.x'

# Conflicts:
#   poetry.lock
parents ac5074da ab5bfc66
No related branches found
No related tags found
1 merge request!257Update dependency flake8-isort to v3
Pipeline #2017 failed
......@@ -2,6 +2,7 @@ from typing import Any, List, Optional, Tuple
import django.apps
from django.http import HttpRequest
from django.core.files.uploadedfile import TemporaryUploadedFile
from dynamic_preferences.registries import preference_models
......@@ -59,10 +60,15 @@ class CoreConfig(AppConfig):
elif name in ("favicon", "pwa_icon"):
from favicon.models import Favicon # noqa
Favicon.on_site.update_or_create(
title=name,
defaults={"isFavicon": name == "favicon", "faviconImage": new_value,},
)
is_favicon = name == "favicon"
if new_value:
Favicon.on_site.update_or_create(
title=name,
defaults={"isFavicon": name == "favicon", "faviconImage": new_value, },
)
else:
Favicon.on_site.filter(title=name, isFavicon=is_favicon).delete()
def post_migrate(
self,
......
......@@ -141,11 +141,11 @@ class Person(ExtensibleModel):
return f"{self.last_name}, {self.first_name}"
@property
def adressing_name(self) -> str:
def addressing_name(self) -> str:
"""Full name of person in format configured for addressing."""
if get_site_preferences()["notification__addressing_name_format"] == "last_first":
if self.preferences["notification__addressing_name_format"] == "last_first":
return f"{self.last_name}, {self.first_name}"
elif get_site_preferences()["notification__addressing_name_format"] == "first_last":
elif self.preferences["notification__addressing_name_format"] == "first_last":
return f"{self.first_name} {self.last_name}"
@property
......
This diff is collapsed.
......@@ -63,8 +63,9 @@
<!-- Main nav (sidenav) -->
<ul id="slide-out" class="sidenav sidenav-fixed">
<li class="logo">
{% static "img/aleksis-banner.svg" as aleksis_banner %}
<a id="logo-container" href="/" class="brand-logo">
<img src="{{ request.site.preferences.theme__logo.url }}"
<img src="{% firstof request.site.preferences.theme__logo.url aleksis_banner %}"
alt="{{ request.site.preferences.general__title }} – Logo">
</a>
</li>
......
......@@ -33,7 +33,7 @@ def send_templated_sms(
def _send_notification_email(notification: "Notification", template: str = "notification") -> None:
context = {
"notification": notification,
"notification_user": notification.recipient.adressing_name,
"notification_user": notification.recipient.addressing_name,
}
send_templated_mail(
template_name=template,
......@@ -48,7 +48,7 @@ def _send_notification_sms(
) -> None:
context = {
"notification": notification,
"notification_user": notification.recipient.adressing_name,
"notification_user": notification.recipient.addressing_name,
}
send_templated_sms(
template_name=template,
......
......@@ -1036,7 +1036,7 @@ description = "Plugin to catch bad style specific to Django Projects"
name = "flake8-django"
optional = false
python-versions = "*"
version = "0.0.4"
version = "1.0.0"
[package.dependencies]
flake8 = "*"
......@@ -1807,13 +1807,13 @@ description = "Python documentation generator"
name = "sphinx"
optional = false
python-versions = ">=3.5"
version = "2.4.4"
version = "3.0.3"
[package.dependencies]
Jinja2 = ">=2.3"
Pygments = ">=2.0"
alabaster = ">=0.7,<0.8"
babel = ">=1.3,<2.0 || >2.0"
babel = ">=1.3"
colorama = ">=0.3.5"
docutils = ">=0.12"
imagesize = "*"
......@@ -1830,7 +1830,8 @@ sphinxcontrib-serializinghtml = "*"
[package.extras]
docs = ["sphinxcontrib-websupport"]
test = ["pytest (<5.3.3)", "pytest-cov", "html5lib", "flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.761)", "docutils-stubs"]
lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"]
test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"]
[[package]]
category = "dev"
......@@ -2467,9 +2468,7 @@ flake8-builtins = [
{file = "flake8_builtins-1.5.2-py2.py3-none-any.whl", hash = "sha256:a0296d23da92a6f2494243b9f2039bfdb73f34aba20054c1b70b2a60c84745bb"},
]
flake8-django = [
{file = "flake8-django-0.0.4.tar.gz", hash = "sha256:7329ec2e2b8b194e8109639c534359014c79df4d50b14f4b85b8395edc5d6760"},
{file = "flake8_django-0.0.4-py3.5.egg", hash = "sha256:ca66462724acbcf241d29edec201dac40c05cc27ae118b5abb8d74066681402f"},
{file = "flake8_django-0.0.4-py3.7.egg", hash = "sha256:29721a4976f784921b140752234447af1192c4e4f989d0db4e2d9f7f7915fa86"},
{file = "flake8-django-1.0.0.tar.gz", hash = "sha256:2c9e4b8bdcad3084d3a335a0e305cbf66cd9a2af937d66c50c859c1f966036b2"},
]
flake8-docstrings = [
{file = "flake8-docstrings-1.5.0.tar.gz", hash = "sha256:3d5a31c7ec6b7367ea6506a87ec293b94a0a46c0bce2bb4975b7f1d09b6f3717"},
......@@ -2906,8 +2905,8 @@ spdx-license-list = [
{file = "spdx_license_list-0.4.0.tar.gz", hash = "sha256:f8b5eeda2a1c88d8ce15f6324d5a6128a462932a2e55b032f017ac9a0e61f1c7"},
]
sphinx = [
{file = "Sphinx-2.4.4-py3-none-any.whl", hash = "sha256:fc312670b56cb54920d6cc2ced455a22a547910de10b3142276495ced49231cb"},
{file = "Sphinx-2.4.4.tar.gz", hash = "sha256:b4c750d546ab6d7e05bdff6ac24db8ae3e8b8253a3569b754e445110a0a12b66"},
{file = "Sphinx-3.0.3-py3-none-any.whl", hash = "sha256:f5505d74cf9592f3b997380f9bdb2d2d0320ed74dd69691e3ee0644b956b8d83"},
{file = "Sphinx-3.0.3.tar.gz", hash = "sha256:62edfd92d955b868d6c124c0942eba966d54b5f3dcb4ded39e65f74abac3f572"},
]
sphinx-autodoc-typehints = [
{file = "sphinx-autodoc-typehints-1.10.3.tar.gz", hash = "sha256:a6b3180167479aca2c4d1ed3b5cb044a70a76cccd6b38662d39288ebd9f0dff0"},
......
......@@ -91,7 +91,7 @@ ldap = ["django-auth-ldap"]
celery = ["Celery", "django-celery-results", "django-celery-beat", "django-celery-email", "celery-haystack"]
[tool.poetry.dev-dependencies]
sphinx = "^2.1"
sphinx = "^3.0"
sphinxcontrib-django = "^0.5.0"
sphinx-autodoc-typehints = "^1.7"
django-stubs = "^1.1"
......@@ -101,7 +101,7 @@ pytest-django-testing-postgresql = "^0.1"
selenium = "^3.141.0"
safety = "^1.8.5"
flake8 = "^3.7.9"
flake8-django = "^0.0.4"
flake8-django = "^1.0.0"
flake8-fixme = "^1.1.1"
flake8-mypy = "^17.8.0"
flake8-bandit = "^2.1.2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment