19 lines
511 B
Python
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")}
|