From ac7228ec5030e2995025cf6a7ca67574b9f7c0a1 Mon Sep 17 00:00:00 2001 From: "Nick Seidenman (N6)" Date: Fri, 17 Feb 2017 18:36:58 +1100 Subject: [PATCH] Default content page and sponsor list is working, mostly. TODO: get sponsor logos to show up instead of the names (text). --- .../migrations/0020_auto_20170217_1220.py | 24 +++++++++++++++ cms_pages/models.py | 3 +- pinaxcon/settings.py | 29 +++++++++++++++--- .../cms_pages/abstract_content_page.html | 15 +++++++++ pinaxcon/templates/lca2017/content_page.html | 1 + .../templates/pyconau2017/content_page.html | 20 +++++++----- pinaxcon/templates/site_base.html | 26 ++++++++-------- pinaxcon/templates/site_base_wagtail.html | 11 ++++--- pinaxcon/templates/sitetree_header.html | 4 ++- pinaxcon/urls.py | 15 ++++++++- requirements.txt | 4 +++ static/src/manifest.appcache | 14 +++++++++ static/src/pyconau2017/css/pyconau.css | 18 ++++++++++- .../images/pyconau-2016-collage-faded.jpg | Bin 0 -> 539305 bytes 14 files changed, 151 insertions(+), 33 deletions(-) create mode 100644 cms_pages/migrations/0020_auto_20170217_1220.py create mode 100644 static/src/manifest.appcache create mode 100644 static/src/pyconau2017/images/pyconau-2016-collage-faded.jpg diff --git a/cms_pages/migrations/0020_auto_20170217_1220.py b/cms_pages/migrations/0020_auto_20170217_1220.py new file mode 100644 index 00000000..f79598cf --- /dev/null +++ b/cms_pages/migrations/0020_auto_20170217_1220.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2017-02-17 01:20 +from __future__ import unicode_literals + +import cms_pages.models +from django.db import migrations +import wagtail.wagtailcore.blocks +import wagtail.wagtailcore.fields +import wagtail.wagtailimages.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms_pages', '0019_auto_20170116_1334'), + ] + + operations = [ + migrations.AlterField( + model_name='homepage', + name='body', + field=wagtail.wagtailcore.fields.StreamField([('basic_content', wagtail.wagtailcore.blocks.StructBlock([(b'panel_type', wagtail.wagtailcore.blocks.ChoiceBlock(choices=[('simple', 'Simple panel, no image.'), ('blue_left', 'Left-aligned image, blue-filtered image BG'), ('white_right', 'Right-aligned image, white background')])), (b'heading', wagtail.wagtailcore.blocks.CharBlock(required=True)), (b'inset_illustration', wagtail.wagtailcore.blocks.ChoiceBlock(choices=[('antarctica.svg', 'Antarctica'), ('bridge.svg', 'Bridge'), ('casino.svg', 'Casino'), ('cradle.svg', 'Cradle Mountain'), ('devil.svg', 'Tasmanian Devil'), ('falls.svg', 'Waterfall'), ('hobart.svg', 'Hobart'), ('lavender.svg', 'Lavender'), ('logo-mel.png', 'Pycon AU'), ('Python-logo-notext.svg', 'Python'), ('tuz.svg', 'Tuz'), ('wineglass.svg', 'Wineglass')], required=False)), (b'background_image', wagtail.wagtailimages.blocks.ImageChooserBlock(help_text="This is used as the background image of a blue-left block. It's not used for white-right.", required=False)), (b'body', wagtail.wagtailcore.blocks.RawHTMLBlock(required=True)), (b'link', wagtail.wagtailcore.blocks.StructBlock([(b'page', wagtail.wagtailcore.blocks.PageChooserBlock(help_text='You must specify either this, or the URL.', required=False)), (b'url', wagtail.wagtailcore.blocks.CharBlock(help_text='You must specify either this, or the URL.', required=False)), (b'title', wagtail.wagtailcore.blocks.CharBlock(required=True))])), (b'external_links', wagtail.wagtailcore.blocks.ListBlock(cms_pages.models.ExternalLinksBlock)), (b'compact', wagtail.wagtailcore.blocks.BooleanBlock(help_text="True if this block is to be displayed in 'compact' mode", required=False))])), ('keynotes', wagtail.wagtailcore.blocks.StructBlock([(b'heading', wagtail.wagtailcore.blocks.CharBlock(required=True)), (b'speakers', wagtail.wagtailcore.blocks.ListBlock(cms_pages.models.KeynoteSpeakerBlock))]))]), + ), + ] diff --git a/cms_pages/models.py b/cms_pages/models.py index ba46acf3..b5e67961 100644 --- a/cms_pages/models.py +++ b/cms_pages/models.py @@ -122,7 +122,7 @@ class BasicContentBlock(blocks.StructBlock): heading = blocks.CharBlock(required=True) inset_illustration = blocks.ChoiceBlock( choices=ILLUSTRATION_TYPES, - required=True, + required=False, ) background_image = imageblocks.ImageChooserBlock( required=False, @@ -254,6 +254,7 @@ class ContentPage(AbstractContentPage): inset_illustration = models.CharField( choices=ILLUSTRATION_TYPES, max_length=256, + required=False, ) content_panels = AbstractContentPage.content_panels + [ diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index c60747ac..1c019346 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -15,10 +15,10 @@ DATABASES = { #} 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'pycontest', - 'USER': 'nicks', - 'PASSWORD': 'spam&eggs', - 'HOST': 'localhost', + 'NAME': 'pycon2017_uat', + 'USER': 'pycon2017_uat', + 'PASSWORD': 'Eishuqu5johZee3G', + 'HOST': '172.16.0.100', 'PORT': '', } } @@ -129,6 +129,7 @@ MIDDLEWARE_CLASSES = [ "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.auth.middleware.SessionAuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", + "debug_toolbar.middleware.DebugToolbarMiddleware", "reversion.middleware.RevisionMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", 'wagtail.wagtailcore.middleware.SiteMiddleware', @@ -150,6 +151,7 @@ INSTALLED_APPS = [ "django.contrib.sites", "django.contrib.staticfiles", "django.contrib.humanize", + "debug_toolbar", # theme "bootstrapform", @@ -226,6 +228,25 @@ INSTALLED_APPS = [ "django_nose", ] +DEBUG_TOOLBAR_PANELS = [ + 'debug_toolbar.panels.versions.VersionsPanel', + 'debug_toolbar.panels.timer.TimerPanel', + 'debug_toolbar.panels.settings.SettingsPanel', + 'debug_toolbar.panels.headers.HeadersPanel', + 'debug_toolbar.panels.request.RequestPanel', + 'debug_toolbar.panels.sql.SQLPanel', + 'debug_toolbar.panels.staticfiles.StaticFilesPanel', + 'debug_toolbar.panels.templates.TemplatesPanel', + 'debug_toolbar.panels.cache.CachePanel', + 'debug_toolbar.panels.signals.SignalsPanel', + 'debug_toolbar.panels.logging.LoggingPanel', + 'debug_toolbar.panels.redirects.RedirectsPanel', +] + +DEBUG_TOOLBAR_CONFIG = { + 'INTERCEPT_REDIRECTS': False, + 'SHOW_TOOLBAR_CALLBACK': lambda x: True, +} LOGGING = { 'version': 1, diff --git a/pinaxcon/templates/cms_pages/abstract_content_page.html b/pinaxcon/templates/cms_pages/abstract_content_page.html index 42efc011..037dea63 100644 --- a/pinaxcon/templates/cms_pages/abstract_content_page.html +++ b/pinaxcon/templates/cms_pages/abstract_content_page.html @@ -19,5 +19,20 @@ {% block header_inset_image %}{% endblock %} {% block content %} +
+
+
xxx
+
+
{{ page.body }} +
+
+
+
+

Sponsors

+ {% include "symposion/sponsorship/_wall.html" %} +
+
+
+
{% endblock %} diff --git a/pinaxcon/templates/lca2017/content_page.html b/pinaxcon/templates/lca2017/content_page.html index 0f3e05b1..3b2542e8 100644 --- a/pinaxcon/templates/lca2017/content_page.html +++ b/pinaxcon/templates/lca2017/content_page.html @@ -13,6 +13,7 @@ {% block head_title %}{% endblock %} {% block body %} + THIS IS THE LCA PAGE CONTENT {% block heading_panel %}
diff --git a/pinaxcon/templates/pyconau2017/content_page.html b/pinaxcon/templates/pyconau2017/content_page.html index 7b1dc736..0abc1355 100644 --- a/pinaxcon/templates/pyconau2017/content_page.html +++ b/pinaxcon/templates/pyconau2017/content_page.html @@ -12,25 +12,29 @@ {% block head_title %}{% endblock %} +{% comment %} +{% block body_base %} {% block body %} {% block heading_panel %} - - {% block topbar_base %} {% endblock %} {% endblock %} {% block content_base %} -
- {% block content %} - {% endblock %} -
- {% endblock %} + +{% endcomment %} + +{% block content_base %} +{% block content %} +{% endblock %} {% endblock %} +{% comment %} +the name "extra_script" doesn't actually match the inherited name... {% block extra_script %} - + {% endblock %} +{% endcomment %} diff --git a/pinaxcon/templates/site_base.html b/pinaxcon/templates/site_base.html index f053c57c..ff2d72a0 100755 --- a/pinaxcon/templates/site_base.html +++ b/pinaxcon/templates/site_base.html @@ -1,23 +1,18 @@ + {% load staticfiles %} {% load metron_tags %} {% load i18n %} {% load sitetree %} {# #} - + - - - - - - {% block viewport %} - + {% endblock %} {% block head_title_base %}{% if SITE_NAME %}{{ SITE_NAME }} | {% endif %}{% block head_title %}{% endblock %}{% endblock %} @@ -28,7 +23,7 @@ - @@ -37,8 +32,8 @@ - + + @@ -54,7 +49,7 @@ {% endblock %} + style="background-image: url({% static 'pyconau2017/images/pyconau-2016-collage-faded.jpg' %});"> {% block topbar_base %} {% block nav %} @@ -65,23 +60,27 @@ {% endblock %} + {% block body_base %} + {% block body %} {% block content %} {% endblock %} {% endblock %} + {% endblock %} + {% block footer_base %} {% block footer %} {% endblock %} - + {% endblock %} {% block scripts %} @@ -99,3 +98,4 @@ {% endblock %} + diff --git a/pinaxcon/templates/site_base_wagtail.html b/pinaxcon/templates/site_base_wagtail.html index 4499797f..d5aec5f8 100644 --- a/pinaxcon/templates/site_base_wagtail.html +++ b/pinaxcon/templates/site_base_wagtail.html @@ -1,18 +1,20 @@ + {% extends "site_base.html" %} {% load staticfiles %} {% block extra_style %}{% endblock %} -{% comment %} {% block body_base %} + {% comment %} {% include "_messages.html" %} {% endcomment %} + {% block body %} + {% block content %} {% endblock %} - + {% endblock %} - {% comment %} + {% endblock %} -{% endcomment %} {% block scripts %} @@ -25,4 +27,5 @@ {% block scripts_extra %} {% endblock %} + {% endblock %} diff --git a/pinaxcon/templates/sitetree_header.html b/pinaxcon/templates/sitetree_header.html index 1c9f5661..7d89cdd2 100644 --- a/pinaxcon/templates/sitetree_header.html +++ b/pinaxcon/templates/sitetree_header.html @@ -1,5 +1,6 @@ {% load sitetree %} -