[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-01-29 21:06:38 +00:00 committed by crocmagnon-pr[bot]
parent d844f54f82
commit 6e73c50ff6
3 changed files with 7 additions and 6 deletions

View file

@ -101,9 +101,9 @@ class CharacterAdminForm(ModelForm):
"path__race", "path__race",
"path__profile", "path__profile",
) )
self.fields[ self.fields["racial_capability"].queryset = (
"racial_capability" models.RacialCapability.objects.select_related("race")
].queryset = models.RacialCapability.objects.select_related("race") )
class PartyInline(admin.TabularInline): class PartyInline(admin.TabularInline):

View file

@ -54,9 +54,9 @@ class AddPathForm(forms.Form):
class CharacterForm(forms.ModelForm): class CharacterForm(forms.ModelForm):
def __init__(self, *args, **kwargs) -> None: def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.fields[ self.fields["racial_capability"].queryset = (
"racial_capability" RacialCapability.objects.select_related("race")
].queryset = RacialCapability.objects.select_related("race") )
self.fields["damage_reduction"].widget.attrs.update({"rows": 2}) self.fields["damage_reduction"].widget.attrs.update({"rows": 2})
self.fields["equipment"].widget.attrs.update({"rows": 3}) self.fields["equipment"].widget.attrs.update({"rows": 3})

View file

@ -13,6 +13,7 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path 1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.conf import settings from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static
from django.contrib import admin from django.contrib import admin