How to use the wagtail.wagtailcore.fields.RichTextField function in wagtail

To help you get started, we’ve selected a few wagtail examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CIGIHub / opencanada / articles / migrations / 0054_seriespage_short_description.py View on Github external
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),
        ),
github torchbox / wagtail-torchbox / tbx / core / migrations / 0006_auto_20150326_1023.py View on Github external
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',
github dataletsch / blemmy / publichealth / home / models / forms.py View on Github external
)

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"),
    ]
github pgovers / oscar-wagtail-demo / demo / models.py View on Github external
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")
]
github TakwimuAfrica / Takwimu / takwimu / migrations / 0018_auto_20180709_1604.py View on Github external
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(),
        ),
github tkjone / guides-django / series_3 / p_03 / myproject / src / server / apps / wagtail / pages / models / home.py View on Github external
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
github torchbox / wagtail-torchbox / tbx / core / migrations / 0027_auto_20160603_1718.py View on Github external
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)'),
        ),