Files
fet2020/fet2020/core/forms.py
2023-01-09 16:34:02 +00:00

19 lines
511 B
Python

from ckeditor_uploader.widgets import CKEditorUploadingWidget
from django import forms
from .models import CustomFlatPage
class FlatPageForm(forms.ModelForm):
__choices = [
("flatpages/default.html", "default.html"),
("flatpages/social_media.html", "social_media.html"),
]
template_name = forms.ChoiceField(choices=__choices)
class Meta:
model = CustomFlatPage
fields = "__all__"
widgets = {"content": CKEditorUploadingWidget(config_name="default")}