chore: remove form fields from tutorial
This commit is contained in:
parent
8a63e639b1
commit
ce02ef9741
2 changed files with 45 additions and 22 deletions
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 5.0.2 on 2024-10-06 15:19
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('base', '0006_navigationsettings_bluesky_url_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='formpage',
|
||||
name='page_ptr',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='FormField',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='FormPage',
|
||||
),
|
||||
]
|
|
@ -76,25 +76,25 @@ class FooterText(
|
|||
class Meta(TranslatableMixin.Meta):
|
||||
verbose_name_plural = "Footer Text"
|
||||
|
||||
|
||||
class FormField(AbstractFormField):
|
||||
page = ParentalKey('FormPage', on_delete=models.CASCADE, related_name='form_fields')
|
||||
|
||||
|
||||
class FormPage(AbstractEmailForm):
|
||||
intro = RichTextField(blank=True)
|
||||
thank_you_text = RichTextField(blank=True)
|
||||
|
||||
content_panels = AbstractEmailForm.content_panels + [
|
||||
FormSubmissionsPanel(),
|
||||
FieldPanel('intro'),
|
||||
InlinePanel('form_fields', label="Form fields"),
|
||||
FieldPanel('thank_you_text'),
|
||||
MultiFieldPanel([
|
||||
FieldRowPanel([
|
||||
FieldPanel('from_address'),
|
||||
FieldPanel('to_address'),
|
||||
]),
|
||||
FieldPanel('subject'),
|
||||
], "Email"),
|
||||
]
|
||||
#
|
||||
# class FormField(AbstractFormField):
|
||||
# page = ParentalKey('FormPage', on_delete=models.CASCADE, related_name='form_fields')
|
||||
#
|
||||
#
|
||||
# class FormPage(AbstractEmailForm):
|
||||
# intro = RichTextField(blank=True)
|
||||
# thank_you_text = RichTextField(blank=True)
|
||||
#
|
||||
# content_panels = AbstractEmailForm.content_panels + [
|
||||
# FormSubmissionsPanel(),
|
||||
# FieldPanel('intro'),
|
||||
# InlinePanel('form_fields', label="Form fields"),
|
||||
# FieldPanel('thank_you_text'),
|
||||
# MultiFieldPanel([
|
||||
# FieldRowPanel([
|
||||
# FieldPanel('from_address'),
|
||||
# FieldPanel('to_address'),
|
||||
# ]),
|
||||
# FieldPanel('subject'),
|
||||
# ], "Email"),
|
||||
# ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue