Skip to content

Commit

Permalink
Drop 'block' from naming convention (#11551)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhowbrook authored Dec 15, 2023
1 parent 0af1ee0 commit b1a3d94
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion network-api/networkapi/mozfest/blocks/stats_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class StatisticsBlock(blocks.StructBlock):
class Meta:
icon = "placeholder"
template = "fragments/blocks/stats_block.html"
label = "Stats Block"
label = "Statistics"
2 changes: 1 addition & 1 deletion network-api/networkapi/mozfest/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from networkapi.wagtailpages.factory.image_factory import ImageFactory
from networkapi.wagtailpages.factory.signup import SignupFactory

streamfield_fields = ["paragraph", "image", "spacer", "quote", "stats_block", "listing"]
streamfield_fields = ["paragraph", "image", "spacer", "quote", "statistics", "listing"]

Faker.add_provider(StreamfieldProvider)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ class Migration(migrations.Migration):
),
),
(
"stats_block",
"statistics",
wagtail.blocks.StructBlock(
[
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ class Migration(migrations.Migration):
),
),
(
"stats_block",
"statistics",
wagtail.blocks.StructBlock(
[
(
Expand Down
2 changes: 1 addition & 1 deletion network-api/networkapi/mozfest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MozfestPrimaryPage(FoundationMetadataPageMixin, FoundationBannerInheritanc
("tito_widget", customblocks.TitoWidgetBlock()),
("tabbed_profile_directory", customblocks.TabbedProfileDirectory()),
("newsletter_signup", customblocks.NewsletterSignupBlock()),
("stats_block", mozfest_blocks.StatisticsBlock()),
("statistics", mozfest_blocks.StatisticsBlock()),
],
use_json_field=True,
)
Expand Down
4 changes: 2 additions & 2 deletions network-api/networkapi/utility/faker/streamfield_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def generate_stats_block_field():
}
)

return generate_field("stats_block", {"statistics": statistics})
return generate_field("statistics", {"statistics": statistics})


def generate_pulse_listing_field():
Expand Down Expand Up @@ -545,7 +545,7 @@ def streamfield(self, fields=None):
"current_events_slider": generate_current_events_slider_field,
"callout_box": generate_blog_index_callout_box_field,
"blog_newsletter_signup": generate_blog_newsletter_signup_field,
"stats_block": generate_stats_block_field,
"statistics": generate_stats_block_field,
"listing": generate_listing_block_field,
}

Expand Down

0 comments on commit b1a3d94

Please sign in to comment.