Theme selector

This commit is contained in:
Mouse Reeve
2022-02-27 10:00:50 -08:00
parent 6e96c1eee7
commit 3dfbb3272e
11 changed files with 184 additions and 34 deletions

View File

@@ -454,6 +454,24 @@ class SiteForm(CustomForm):
}
class SiteThemeForm(CustomForm):
class Meta:
model = models.SiteSettings
fields = ["default_theme"]
class ThemeForm(CustomForm):
class Meta:
model = models.Theme
fields = ["name", "path"]
widgets = {
"name": forms.TextInput(attrs={"aria-describedby": "desc_name"}),
"path": ClearableFileInputWithWarning(
attrs={"aria-describedby": "desc_path"}
),
}
class AnnouncementForm(CustomForm):
class Meta:
model = models.Announcement