Add configuration page: implement ConfigurationForm, update views, templates, and routes to enable superusers to manage club settings and toggle features using django-waffle.
This commit is contained in:
12
backend/forms.py
Normal file
12
backend/forms.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django import forms
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ConfigurationForm(forms.Form):
|
||||
"""Form instance that holds configuration values for the application."""
|
||||
|
||||
club_name = forms.CharField(label=_("Club name"), max_length=250)
|
||||
club_location = forms.CharField(label=_("Club location"), max_length=250, help_text=_("Changing this setting will set a new home game location and will update already existing games"))
|
||||
club_logo = forms.ImageField(label=_("Club logo"), required=False)
|
||||
enable_teams = forms.BooleanField(label=_("Enable teams"), required=False)
|
||||
enable_activities = forms.BooleanField(label=_("Enable activities"), required=False)
|
||||
Reference in New Issue
Block a user