Make Tag optional while pageedit

This commit is contained in:
Dirk Alders 2024-10-11 19:21:03 +02:00
parent 6a401f322f
commit a0401241ef

View File

@ -6,7 +6,7 @@ from django.forms.utils import ErrorList
class EditForm(forms.Form): # Note that it is not inheriting from forms.ModelForm class EditForm(forms.Form): # Note that it is not inheriting from forms.ModelForm
page_txt = forms.CharField(max_length=20000, label="Page source text", widget=forms.Textarea(attrs={"rows": "20"})) page_txt = forms.CharField(max_length=20000, label="Page source text", widget=forms.Textarea(attrs={"rows": "20"}))
page_tags = forms.CharField(max_length=20000, label="Tags (words separated by spaces)") page_tags = forms.CharField(max_length=20000, label="Tags (words separated by spaces)", required=False)
def __init__(self, *args, **kwargs) -> None: def __init__(self, *args, **kwargs) -> None:
page_data = kwargs.pop("page_data") page_data = kwargs.pop("page_data")