Skip to content

Commit

Permalink
ci: auto fixes from pre-commit hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 90f541c commit ef1fad8
Show file tree
Hide file tree
Showing 17 changed files with 161 additions and 160 deletions.
2 changes: 1 addition & 1 deletion djangocms_admin_style/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
10. Publish the release when ready
11. Github actions will publish the new package to pypi
"""
__version__ = '3.3.0'
__version__ = "3.3.0"
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Angelo Dini <finalangeljp@hotmail.com>, 2016
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Paulo <paulo.alvarado@divio.ch>, 2015
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Frigory33 <chironsylvain@orange.fr>, 2016
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# yakky <i.spalletti@nephila.it>, 2015
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/lt/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Matas Dailyda <matas@dailyda.com>, 2015
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Mikhail Kolesnik <mike@openbunker.org>, 2015
Expand Down
2 changes: 1 addition & 1 deletion djangocms_admin_style/locale/uk/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Translators:
# Mikhail Kolesnik <mike@openbunker.org>, 2015
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

mark {
color: $black;
font-weight: bold;
font-weight: bold;
font-style: italic;
background-color: #ff9;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion djangocms_admin_style/templates/admin/inc/branding.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>{{ site_header|default:_('Django Administration') }}</h1>
{% endif %}
{% if user.is_authenticated %}
<li>
<form method="POST" action="{% url 'admin:logout' %}">
<form method="POST" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">
<b>{% trans 'Log out' %} {% firstof user.get_short_name user.get_username %}</b>
Expand Down
22 changes: 11 additions & 11 deletions djangocms_admin_style/templatetags/admin_style_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
# We follow the Semantic versioning convention
# minor - Refers to the minor release track (3.x.1)
# patch - Refers to the patch release track (3.4.x)
VALID_VERSION_CHECK_TYPES = ('minor', 'patch')
VALID_VERSION_CHECK_TYPES = ("minor", "patch")

register = template.Library()


@register.simple_tag(takes_context=True)
def current_site_name(context):
request = context.get('request')
request = context.get("request")

try:
site_name = get_current_site(request).name
except AttributeError:
# This happens if request is None
# and sites framework is not in INSTALLED_APPS
site_name = gettext('my site')
site_name = gettext("my site")
return conditional_escape(site_name)


Expand All @@ -35,22 +35,22 @@ def render_update_notification(context):
check_type = None
notifications_enabled = False
else:
check_type = getattr(settings, 'CMS_UPDATE_CHECK_TYPE', 'patch')
notifications_enabled = getattr(settings, 'CMS_ENABLE_UPDATE_CHECK', True)
check_type = getattr(settings, "CMS_UPDATE_CHECK_TYPE", "patch")
notifications_enabled = getattr(settings, "CMS_ENABLE_UPDATE_CHECK", True)

request = context.get('request')
request = context.get("request")

try:
index_page = request.resolver_match.url_name == 'index'
index_page = request.resolver_match.url_name == "index"
except AttributeError:
notifications_enabled = False
else:
notifications_enabled = index_page and notifications_enabled

if notifications_enabled and check_type in VALID_VERSION_CHECK_TYPES:
context = {
'cms_version': cms.__version__,
'cms_version_check_type': check_type,
"cms_version": cms.__version__,
"cms_version_check_type": check_type,
}
return render_to_string('admin/inc/cms_upgrade_notification.html', context)
return ''
return render_to_string("admin/inc/cms_upgrade_notification.html", context)
return ""
90 changes: 45 additions & 45 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,61 @@


CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django CMS',
'Framework :: Django CMS :: 3.6',
'Framework :: Django CMS :: 3.7',
'Framework :: Django CMS :: 3.8',
'Framework :: Django CMS :: 3.8',
'Framework :: Django CMS :: 3.9',
'Framework :: Django CMS :: 3.10',
'Framework :: Django CMS :: 3.11',
'Framework :: Django CMS :: 4.0',
'Framework :: Django CMS :: 4.1',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django CMS",
"Framework :: Django CMS :: 3.6",
"Framework :: Django CMS :: 3.7",
"Framework :: Django CMS :: 3.8",
"Framework :: Django CMS :: 3.8",
"Framework :: Django CMS :: 3.9",
"Framework :: Django CMS :: 3.10",
"Framework :: Django CMS :: 3.11",
"Framework :: Django CMS :: 4.0",
"Framework :: Django CMS :: 4.1",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
]

this_directory = Path(__file__).parent
long_description = (this_directory / "README.rst").read_text()

setup(
name='djangocms-admin-style',
name="djangocms-admin-style",
version=__version__,
author='Divio AG',
author_email='info@divio.ch',
maintainer='Django CMS Association and contributors',
maintainer_email='info@django-cms.org',
url='https://github.com/django-cms/djangocms-admin-style',
license='BSD-3-Clause',
description='Adds pretty CSS styles for the django CMS admin interface.',
author="Divio AG",
author_email="info@divio.ch",
maintainer="Django CMS Association and contributors",
maintainer_email="info@django-cms.org",
url="https://github.com/django-cms/djangocms-admin-style",
license="BSD-3-Clause",
description="Adds pretty CSS styles for the django CMS admin interface.",
long_description=long_description,
packages=find_packages(exclude=['preview', 'tests']),
python_requires='>=3.7',
packages=find_packages(exclude=["preview", "tests"]),
python_requires=">=3.7",
include_package_data=True,
zip_safe=False,
install_requires=REQUIREMENTS,
classifiers=CLASSIFIERS,
test_suite='tests.settings.run',
test_suite="tests.settings.run",
)
Loading

0 comments on commit ef1fad8

Please sign in to comment.