Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import wagtail.wagtailcore.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0053_auto_20150903_1738'),
]
operations = [
migrations.AddField(
model_name='seriespage',
name='short_description',
field=wagtail.wagtailcore.fields.RichTextField(default='', blank=True),
),
migrations.AlterField(
model_name='blogpage',
name='body',
field=wagtail.wagtailcore.fields.RichTextField(verbose_name='body (deprecated. Use streamfield instead)'),
preserve_default=True,
),
migrations.AlterField(
model_name='blogpage',
name='intro',
field=wagtail.wagtailcore.fields.RichTextField(verbose_name='Intro (deprecated. Use streamfield instead)', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='standardpage',
name='body',
field=wagtail.wagtailcore.fields.RichTextField(verbose_name='Body (deprecated. Use streamfield instead)', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='standardpage',
name='intro',
field=wagtail.wagtailcore.fields.RichTextField(verbose_name='Intro (deprecated. Use streamfield instead)', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='workpage',
name='body',
field=wagtail.wagtailcore.fields.RichTextField(verbose_name='Body (deprecated. Use streamfield instead)', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='workpage',
)
from django.db.models import CharField
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailforms.models import (
AbstractEmailForm, AbstractFormField
)
from wagtail.wagtailsearch import index
from ..util import TranslatedField
class ContactFormField(AbstractFormField):
page = ParentalKey('ContactForm', related_name='form_fields')
class ContactForm(AbstractEmailForm):
intro = RichTextField(default='', blank=True)
thanks = RichTextField(default='', blank=True)
search_fields = [ index.SearchField('intro') ]
content_panels = AbstractEmailForm.content_panels + [
FieldPanel('intro', classname="full"),
FieldPanel('thanks', classname="full"),
InlinePanel('form_fields', label="Form fields"),
MultiFieldPanel([
FieldRowPanel([
FieldPanel('from_address', classname="col6"),
FieldPanel('to_address', classname="col6"),
]),
FieldPanel('subject'),
], "Email"),
]
InlinePanel('speakers', label="Speakers"),
InlinePanel('related_links', label="Related links"),
]
EventPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
class FormField(AbstractFormField):
page = ParentalKey('FormPage', related_name='form_fields')
class FormPage(AbstractEmailForm):
intro = RichTextField(blank=True)
thank_you_text = RichTextField(blank=True)
FormPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('intro', classname="full"),
InlinePanel('form_fields', label="Form fields"),
FieldPanel('thank_you_text', classname="full"),
MultiFieldPanel([
FieldPanel('to_address', classname="full"),
FieldPanel('from_address', classname="full"),
FieldPanel('subject', classname="full"),
], "Email")
]
field=models.URLField(default=b'https://takwimu.zendesk.com/', verbose_name=b"'Find Out More' button URL"),
),
migrations.AddField(
model_name='faq',
name='cta_two_name',
field=models.TextField(blank=True, verbose_name=b'Second button Name (optional)'),
),
migrations.AddField(
model_name='faq',
name='cta_two_url',
field=models.URLField(blank=True, verbose_name=b'Second button URL (optional)'),
),
migrations.AlterField(
model_name='faq',
name='answer',
field=wagtail.wagtailcore.fields.RichTextField(),
),
from __future__ import unicode_literals
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class HomePage(Page):
body = RichTextField(blank=True)
template = 'wagtail/pages/home_page.html'
class Meta:
verbose_name = "Home Page"
verbose_name_plural = "Home Pages"
content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('body',),
]
HomePage.promote_panels = Page.promote_panels
from django.db import migrations
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('torchbox', '0026_merge'),
]
operations = [
migrations.AlterField(
model_name='blogpage',
name='intro',
field=wagtail.wagtailcore.fields.RichTextField(blank=True, verbose_name='Intro (used for blog index and Planet Drupal listings)'),
),