diff --git a/cms_pages/models.py b/cms_pages/models.py
index 71c5d0e1..1f8fd2d5 100644
--- a/cms_pages/models.py
+++ b/cms_pages/models.py
@@ -1,6 +1,8 @@
from __future__ import unicode_literals
+from django.http import Http404
from django.db import models
+from django.shortcuts import render
from modelcluster.fields import ParentalKey
@@ -10,6 +12,7 @@ from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.models import Orderable
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailcore.fields import StreamField
+from wagtail.wagtailcore.url_routing import RouteResult
from wagtail.wagtailimages.edit_handlers import ImageChooserPanel
from wagtail.wagtailadmin.edit_handlers import InlinePanel
from wagtail.wagtailadmin.edit_handlers import FieldPanel
@@ -17,7 +20,6 @@ from wagtail.wagtailadmin.edit_handlers import PageChooserPanel
from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel
from wagtail.wagtailsearch import index
-
ILLUSTRATION_ANTARCTICA = "antarctica.svg"
ILLUSTRATION_BRIDGE = "bridge.svg"
ILLUSTRATION_CASINO = "casino.svg"
@@ -152,6 +154,32 @@ class ContentPage(AbstractContentPage):
class NewsIndexPage(AbstractContentPage):
+ def route(self, request, path_components):
+
+ # Try the default to allow children to resolve
+ try:
+ return super(NewsIndexPage, self).route(request, path_components)
+ except Http404:
+ pass
+
+ if path_components:
+ # tell Wagtail to call self.serve() with an additional 'path_components' kwarg
+ return RouteResult(self, kwargs={'path_components': path_components})
+ else:
+ raise Http404
+
+ def serve(self, request, path_components=[]):
+ ''' Optionally return the RSS version of the page '''
+
+ template = self.template
+
+ if path_components and path_components[0] == "rss":
+ template = template.replace(".html", ".rss")
+
+ r = super(NewsIndexPage, self).serve(request)
+ r.template_name = template
+ return r
+
def child_pages(self):
return NewsPage.objects.live().child_of(self).specific().order_by("-date")
diff --git a/pinaxcon/monkey_patch.py b/pinaxcon/monkey_patch.py
index fa66128c..343968d8 100644
--- a/pinaxcon/monkey_patch.py
+++ b/pinaxcon/monkey_patch.py
@@ -14,6 +14,7 @@ def do_monkey_patch():
patch_speaker_profile_form()
patch_accounts_to_send_bcc()
fix_sitetree_check_access_500s()
+ never_cache_login_page()
# Remove this function from existence
global do_monkey_patch
@@ -76,3 +77,8 @@ def fix_sitetree_check_access_500s():
return False
SiteTree.check_access = check_access
+
+def never_cache_login_page():
+ from django.views.decorators.cache import never_cache
+ from account.views import LoginView
+ LoginView.get = never_cache(LoginView.get)
diff --git a/pinaxcon/proposals/admin.py b/pinaxcon/proposals/admin.py
index 2657dc6c..a65159f7 100644
--- a/pinaxcon/proposals/admin.py
+++ b/pinaxcon/proposals/admin.py
@@ -1,6 +1,7 @@
from django.contrib import admin
-from .models import TalkProposal
+import models
-
-admin.site.register(TalkProposal)
+admin.site.register(models.TalkProposal)
+admin.site.register(models.TutorialProposal)
+admin.site.register(models.MiniconfProposal)
diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py
index b8433082..9aa64b5c 100644
--- a/pinaxcon/settings.py
+++ b/pinaxcon/settings.py
@@ -115,7 +115,6 @@ MIDDLEWARE_CLASSES = [
'wagtail.wagtailcore.middleware.SiteMiddleware',
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
- 'pinaxcon.disable_cscache.DisableClientSideCachingMiddleware',
]
ROOT_URLCONF = "pinaxcon.urls"
diff --git a/pinaxcon/templates/_form_snippet.html b/pinaxcon/templates/_form_snippet.html
index f8ca2d80..0c561983 100644
--- a/pinaxcon/templates/_form_snippet.html
+++ b/pinaxcon/templates/_form_snippet.html
@@ -1,5 +1,3 @@
-{% load lca2017_tags %}
-
{% if form.non_field_errors %}
{{ form.non_field_errors }}
@@ -9,16 +7,7 @@
{% if not field.is_hidden %}