diff --git a/ietf/blog/feeds.py b/ietf/blog/feeds.py index 04ee00e2..4a55e787 100644 --- a/ietf/blog/feeds.py +++ b/ietf/blog/feeds.py @@ -1,5 +1,6 @@ from django.contrib.syndication.views import Feed from django.db.models.functions import Coalesce +from wagtail.core.models import Site from ..blog.models import BlogPage from ..utils.models import FeedSettings @@ -8,7 +9,7 @@ class BlogFeed(Feed): link = "/blog/" def __call__(self, request, *args, **kwargs): - settings = FeedSettings.for_site(request.site) + settings = FeedSettings.for_site(Site.find_for_request(request)) self.title = settings.blog_feed_title self.description = settings.blog_feed_description return super().__call__(request, *args, **kwargs) diff --git a/ietf/blog/models.py b/ietf/blog/models.py index f142a661..b243844e 100644 --- a/ietf/blog/models.py +++ b/ietf/blog/models.py @@ -11,7 +11,7 @@ from modelcluster.fields import ParentalKey -from wagtail.core.models import Page +from wagtail.core.models import Page, Site from wagtail.core.fields import StreamField from wagtail.snippets.edit_handlers import ( SnippetChooserPanel @@ -232,7 +232,7 @@ def get_context(self, request, *args, **kwargs): max_siblings_to_show = 5 query_string = "?" filter_text_builder = build_filter_text - feed_settings = FeedSettings.for_site(request.site) + feed_settings = FeedSettings.for_site(Site.find_for_request(request)) # This is mostly duplicted in BlogIndexPage for parameter, functions in parameter_functions_map.items(): diff --git a/ietf/iesg_statement/models.py b/ietf/iesg_statement/models.py index d4182255..487208e1 100644 --- a/ietf/iesg_statement/models.py +++ b/ietf/iesg_statement/models.py @@ -174,7 +174,6 @@ def get_context(self, request, *args, **kwargs): siblings = self.siblings query_string = "?" filter_text_builder = build_filter_text - # TODO feed_settings = FeedSettings.for_site(request.site) for parameter, functions in parameter_functions_map.items(): search_query = request.GET.get(parameter) diff --git a/ietf/settings/base.py b/ietf/settings/base.py index ab710215..af4c5ea2 100644 --- a/ietf/settings/base.py +++ b/ietf/settings/base.py @@ -22,10 +22,6 @@ BASE_DIR = os.path.dirname(PROJECT_DIR) -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ - - # Application definition INSTALLED_APPS = ( @@ -88,7 +84,6 @@ 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'wagtail.core.middleware.SiteMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware', ] diff --git a/ietf/templates/base.html b/ietf/templates/base.html index 261854de..2fce25b3 100644 --- a/ietf/templates/base.html +++ b/ietf/templates/base.html @@ -20,16 +20,16 @@ - - + + - - + + {% block extra_meta %}{% endblock extra_meta %} diff --git a/ietf/templates/includes/social-sharebar.html b/ietf/templates/includes/social-sharebar.html index b956d302..b7668d95 100644 --- a/ietf/templates/includes/social-sharebar.html +++ b/ietf/templates/includes/social-sharebar.html @@ -4,13 +4,13 @@
Share this page
- + - + - +
diff --git a/requirements.txt b/requirements.txt index 3e8d38d4..4379e153 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ Django>=2.2,<3 djangorestframework>=3.8 psycopg2>=2.7.5 -wagtail>=2.8,<2.9 +wagtail>=2.9,<2.10 django-libsass>=0.8 libsass>=0.8.3 future>=0.15.2