Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions network-api/networkapi/campaign/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import json
from networkapi.wagtailpages.models import Petition, Signup


def process_lang_code(lang):
# Salesforce expects "pt" instead of "pt-BR".
# See https://github.com/mozilla/foundation.mozilla.org/issues/5993
Expand Down
6 changes: 5 additions & 1 deletion network-api/networkapi/wagtailpages/pagemodels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ class ParticipatePage2(PrimaryPage):
class Styleguide(PrimaryPage):
template = 'wagtailpages/static/styleguide.html'


class HomepageSpotlightPosts(TranslatableMixin, WagtailOrderable):
page = ParentalKey(
'wagtailpages.Homepage',
Expand Down Expand Up @@ -453,7 +454,7 @@ class Meta(TranslatableMixin.Meta):
def __str__(self):
return self.page.title + '->' + self.highlight.title

# from wagtail.core.models import BootstrapTranslatableModel

class CTA4(TranslatableMixin, CTABase):
page = ParentalKey(
'wagtailpages.ParticipatePage2',
Expand Down Expand Up @@ -492,11 +493,14 @@ class ParticipateHighlights(ParticipateHighlightsBase):

class Meta(TranslatableMixin.Meta):
pass


class ParticipateHighlights2(ParticipateHighlightsBase):
page = ParentalKey(
'wagtailpages.ParticipatePage2',
related_name='featured_highlights2',
)

class Meta(TranslatableMixin.Meta):
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.db import models

from wagtail.admin.edit_handlers import FieldPanel, InlinePanel, StreamFieldPanel
from wagtail.core.models import TranslatableMixin, TranslatableMixin, Page
from wagtail.core.models import TranslatableMixin, Page
from wagtail.core.fields import RichTextField
from wagtail.snippets.edit_handlers import SnippetChooserPanel
from wagtail.snippets.models import register_snippet
Expand Down
2 changes: 1 addition & 1 deletion network-api/networkapi/wagtailpages/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_buyersguide_product_redirect_route(self):
self.assertEqual(response.redirect_chain[0][0], product.url)

def test_sitemap_entries(self):
response = self.client.get('/sitemap.xml')
response = self.client.get('/en/sitemap.xml')
context = response.context

self.assertEqual(context.template_name, 'sitemap.xml')
Expand Down