diff --git a/src/character/admin.py b/src/character/admin.py index 7c41cf9..d2283a2 100644 --- a/src/character/admin.py +++ b/src/character/admin.py @@ -101,9 +101,9 @@ class CharacterAdminForm(ModelForm): "path__race", "path__profile", ) - self.fields[ - "racial_capability" - ].queryset = models.RacialCapability.objects.select_related("race") + self.fields["racial_capability"].queryset = ( + models.RacialCapability.objects.select_related("race") + ) class PartyInline(admin.TabularInline): diff --git a/src/character/forms.py b/src/character/forms.py index bb8cbf9..cb46f7b 100644 --- a/src/character/forms.py +++ b/src/character/forms.py @@ -54,9 +54,9 @@ class AddPathForm(forms.Form): class CharacterForm(forms.ModelForm): def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) - self.fields[ - "racial_capability" - ].queryset = RacialCapability.objects.select_related("race") + self.fields["racial_capability"].queryset = ( + RacialCapability.objects.select_related("race") + ) self.fields["damage_reduction"].widget.attrs.update({"rows": 2}) self.fields["equipment"].widget.attrs.update({"rows": 3}) diff --git a/src/charasheet/urls.py b/src/charasheet/urls.py index 8a36ba2..de03855 100644 --- a/src/charasheet/urls.py +++ b/src/charasheet/urls.py @@ -13,6 +13,7 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + from django.conf import settings from django.conf.urls.static import static from django.contrib import admin