Format code
This commit is contained in:
Родитель
1d8cc789f1
Коммит
f9c5e6656a
|
@ -1,27 +1,75 @@
|
|||
# Generated by Django 3.2.16 on 2023-03-09 22:07
|
||||
|
||||
from django.db import migrations
|
||||
import networkapi.wagtailpages.pagemodels.customblocks.video_block
|
||||
import wagtail.blocks
|
||||
import wagtail.fields
|
||||
import wagtail.images.blocks
|
||||
from django.db import migrations
|
||||
|
||||
import networkapi.wagtailpages.pagemodels.customblocks.video_block
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mozfest', '0024_wagtail_3_upgrade'),
|
||||
("mozfest", "0024_wagtail_3_upgrade"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='mozfesthomepage',
|
||||
name='banner_carousel',
|
||||
field=wagtail.fields.StreamField([('slide', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('heading', wagtail.blocks.CharBlock(required=False)), ('description', wagtail.blocks.CharBlock(required=False))]))], blank=True, help_text='The slides shown on the new Hero. Please ensure that there are exactly 3 slides. The old Hero will be shown if there are no slides present.', null=True, use_json_field=True),
|
||||
model_name="mozfesthomepage",
|
||||
name="banner_carousel",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
(
|
||||
"slide",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
("image", wagtail.images.blocks.ImageChooserBlock()),
|
||||
("heading", wagtail.blocks.CharBlock(required=False)),
|
||||
("description", wagtail.blocks.CharBlock(required=False)),
|
||||
]
|
||||
),
|
||||
)
|
||||
],
|
||||
blank=True,
|
||||
help_text="The slides shown on the new Hero. Please ensure that there are exactly 3 slides. The old Hero will be shown if there are no slides present.",
|
||||
null=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='mozfesthomepage',
|
||||
name='banner_video',
|
||||
field=wagtail.fields.StreamField([('CMS_video', networkapi.wagtailpages.pagemodels.customblocks.video_block.WagtailVideoChooserBlock()), ('external_video', wagtail.blocks.StructBlock([('video_url', wagtail.blocks.URLBlock(help_text='For YouTube: go to your YouTube video and click “Share,” then “Embed,” and then copy and paste the provided URL only. For example: https://www.youtube.com/embed/3FIVXBawyQw For Vimeo: follow similar steps to grab the embed URL. For example: https://player.vimeo.com/video/9004979')), ('thumbnail', wagtail.images.blocks.ImageChooserBlock(help_text='The image to show before the video is played.'))]))], blank=True, help_text='The video to play when users click "Watch Video". This is only shown on the new Hero.', null=True, use_json_field=True),
|
||||
model_name="mozfesthomepage",
|
||||
name="banner_video",
|
||||
field=wagtail.fields.StreamField(
|
||||
[
|
||||
(
|
||||
"CMS_video",
|
||||
networkapi.wagtailpages.pagemodels.customblocks.video_block.WagtailVideoChooserBlock(),
|
||||
),
|
||||
(
|
||||
"external_video",
|
||||
wagtail.blocks.StructBlock(
|
||||
[
|
||||
(
|
||||
"video_url",
|
||||
wagtail.blocks.URLBlock(
|
||||
help_text="For YouTube: go to your YouTube video and click “Share,” then “Embed,” and then copy and paste the provided URL only. For example: https://www.youtube.com/embed/3FIVXBawyQw For Vimeo: follow similar steps to grab the embed URL. For example: https://player.vimeo.com/video/9004979"
|
||||
),
|
||||
),
|
||||
(
|
||||
"thumbnail",
|
||||
wagtail.images.blocks.ImageChooserBlock(
|
||||
help_text="The image to show before the video is played."
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
blank=True,
|
||||
help_text='The video to play when users click "Watch Video". This is only shown on the new Hero.',
|
||||
null=True,
|
||||
use_json_field=True,
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -90,7 +90,7 @@ env = environ.Env(
|
|||
XROBOTSTAG_ENABLED=(bool, False),
|
||||
XSS_PROTECTION=bool,
|
||||
SCOUT_KEY=(str, ""),
|
||||
WAGTAILADMIN_BASE_URL = (str, "")
|
||||
WAGTAILADMIN_BASE_URL=(str, ""),
|
||||
)
|
||||
|
||||
# Read in the environment
|
||||
|
|
|
@ -28,7 +28,6 @@ class BlogIndexTestCase(test_base.WagtailpagesTestCase):
|
|||
)
|
||||
cls.blog_index = blog_models.BlogIndexPage.objects.first()
|
||||
|
||||
|
||||
def fill_index_pages_with_blog_pages(
|
||||
self, index_pages_to_fill: int = 1, base_title: str = "Thisisnotthesearchterm"
|
||||
):
|
||||
|
|
Загрузка…
Ссылка в новой задаче