Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanashraf7 committed Oct 27, 2023
1 parent bc638ff commit 2eec347
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cms/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class Meta:


class SponsorSectionFactory(wagtail_factories.PageFactory):
"""InstructorSectionFactory factory class"""
"""SponsorSectionFactory factory class"""

banner_image = factory.SubFactory(wagtail_factories.ImageFactory)
heading = factory.fuzzy.FuzzyText(prefix="heading ")
Expand Down
2 changes: 1 addition & 1 deletion cms/migrations/0036_add_sponsors_section.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.16 on 2023-10-25 22:48
# Generated by Django 3.2.16 on 2023-10-27 11:32

from django.db import migrations, models
import django.db.models.deletion
Expand Down
19 changes: 14 additions & 5 deletions cms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,10 @@ class Meta:
blank=False,
help_text="The heading to display on this section.",
)
sections = StreamField(
[("section", InstructorSectionBlock())],
help_text="The instructor to display in this section",
)

content_panels = [
ImageChooserPanel("banner_image"),
FieldPanel("heading"),
StreamFieldPanel("sections"),
]


Expand All @@ -460,6 +456,15 @@ class InstructorsSection(InstructorSponsorSection):
InstructorsPage representing a "Your MIT Instructors" section on a product page
"""

sections = StreamField(
[("section", InstructorSectionBlock())],
help_text="The instructor to display in this section",
)

content_panels = InstructorSponsorSection.content_panels + [
StreamFieldPanel("sections"),
]


class SponsorsSection(InstructorSponsorSection):
"""SponsorsPage representing a "Bootcamp Sponsors" section on a product page"""
Expand All @@ -470,6 +475,10 @@ class SponsorsSection(InstructorSponsorSection):
)
InstructorSponsorSection._meta.get_field("heading").default = "Sponsors"

content_panels = InstructorSponsorSection.content_panels + [
StreamFieldPanel("sections"),
]


class AdmissionsSection(BootcampRunChildPage):
"""
Expand Down

0 comments on commit 2eec347

Please sign in to comment.