Skip to content

Commit

Permalink
Upgraded black
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Feb 25, 2024
1 parent c61a358 commit 5627f52
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
6 changes: 3 additions & 3 deletions ddcz/models/used/tavern.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def update_access_privileges(
)
processing_privileges.add(TavernAccessRights.ACCESS_BANNED)
if assistant_admins is not None:
unprocessed_access_map[
TavernAccessRights.ASSISTANT_ADMIN
] = assistant_admins
unprocessed_access_map[TavernAccessRights.ASSISTANT_ADMIN] = (
assistant_admins
)
processing_privileges.add(TavernAccessRights.ASSISTANT_ADMIN)

self.update_legacy_privileges(
Expand Down
30 changes: 18 additions & 12 deletions ddcz/templatetags/tavern.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,26 @@ def tavern_table_name(listing_table, user_profile):

return format_html(
'{}<span class="tavern-table-name{}" data-table-id="{}">{}</span>{}&nbsp;[{}{}]',
mark_safe(
f'<a href="{reverse_lazy("ddcz:tavern-posts", kwargs={"tavern_table_id": listing_table.pk})}">'
)
if show_link
else "",
" tavern_table_name__unread"
if listing_table.new_comments_no is not None
and listing_table.new_comments_no > 0
else "",
(
mark_safe(
f'<a href="{reverse_lazy("ddcz:tavern-posts", kwargs={"tavern_table_id": listing_table.pk})}">'
)
if show_link
else ""
),
(
" tavern_table_name__unread"
if listing_table.new_comments_no is not None
and listing_table.new_comments_no > 0
else ""
),
listing_table.pk,
mark_safe(encode_valid_html(listing_table.name)),
mark_safe("</a>") if show_link else "",
f"{listing_table.new_comments_no}/"
if listing_table.new_comments_no is not None
else "",
(
f"{listing_table.new_comments_no}/"
if listing_table.new_comments_no is not None
else ""
),
listing_table.posts_no,
)
1 change: 1 addition & 0 deletions graveyard/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Django settings for DDCZ project.
"""

from datetime import datetime
import logging
import os, os.path
Expand Down
1 change: 1 addition & 0 deletions graveyard/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from graveyard.settings.base import INSTALLED_APPS
from django.conf import settings
from django.contrib import admin
Expand Down

0 comments on commit 5627f52

Please sign in to comment.