From c3f9a377c987d404f9384207a77237835e8a47a8 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sat, 20 Jan 2018 14:29:04 +0000 Subject: [PATCH] Fixes to make django markdown work with the wiki --- config/settings/common.py | 2 ++ config/settings/local.py | 1 + config/settings/stage.py | 2 ++ mhackspace/templates/base.html | 7 +++--- mhackspace/templates/pages/chat.html | 18 ++++++------- mhackspace/templates/wiki/base.html | 25 +++++++++++++++++++ .../templates/wiki/includes/formfield.html | 2 +- 7 files changed, 44 insertions(+), 13 deletions(-) diff --git a/config/settings/common.py b/config/settings/common.py index fb41ada..acca8d0 100644 --- a/config/settings/common.py +++ b/config/settings/common.py @@ -369,6 +369,8 @@ AUTH_USER_MODEL = 'users.User' LOGIN_REDIRECT_URL = 'users:redirect' WIKI_ACCOUNT_HANDLING = False WIKI_EDITOR = 'wiki.editors.martor.Martor' +WIKI_EDITOR_INCLUDE_JAVASCRIPT = False +EDITOR_INCLUDE_JAVASCRIPT = False MARTOR_ENABLE_CONFIGS = { diff --git a/config/settings/local.py b/config/settings/local.py index 0af723e..4f6e59a 100644 --- a/config/settings/local.py +++ b/config/settings/local.py @@ -17,6 +17,7 @@ from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default=True) +DEBUG = False TEMPLATES[0]['OPTIONS']['debug'] = DEBUG # SECRET CONFIGURATION diff --git a/config/settings/stage.py b/config/settings/stage.py index bfde0aa..e5a2495 100644 --- a/config/settings/stage.py +++ b/config/settings/stage.py @@ -116,6 +116,8 @@ EMAIL_HOST_USER = env('EMAIL_USER') EMAIL_PORT = 587 EMAIL_NOTIFY = False +MSG_PREFIX = 'MHS' + # Anymail with Mailgun #INSTALLED_APPS += ("anymail", ) #ANYMAIL = { diff --git a/mhackspace/templates/base.html b/mhackspace/templates/base.html index 4fd3dcb..f2f3b9a 100644 --- a/mhackspace/templates/base.html +++ b/mhackspace/templates/base.html @@ -181,9 +181,10 @@ {% block modal %}{% endblock modal %} {% block javascript %} - + diff --git a/mhackspace/templates/pages/chat.html b/mhackspace/templates/pages/chat.html index 2399e42..15034af 100644 --- a/mhackspace/templates/pages/chat.html +++ b/mhackspace/templates/pages/chat.html @@ -4,20 +4,20 @@ {% block content %}

Chat with us

- Pop in and say hi, please be patient users tend to idle, but will likely respond given a chance. We have two main chat rooms one on hangouts and the other on IRC, there are various method of connecting below. + Pop in and say hi, please wait around our users tend to idle, some one will likely respond given a chance.

- You can use the chat below or join directly using an IRC client or matrix. -

-

-Join irc via matrix or grab one of the mobile apps.
-Join via freenode website +Full screen Chat or grab one of the mobile apps.

+ + + + +Full screen chat +

Connect directly using irc.freenode.org and the #maidstone-hackspace channel via an irc client.

- - -Alternatively join us on Hangouts +Alternatively join us on our legacy Hangouts chat {% endblock content %} diff --git a/mhackspace/templates/wiki/base.html b/mhackspace/templates/wiki/base.html index 4af41ee..c0c8512 100644 --- a/mhackspace/templates/wiki/base.html +++ b/mhackspace/templates/wiki/base.html @@ -55,9 +55,34 @@ {% block wiki_footer_prepend %}{% endblock %} {% endblock wiki_body %} + + +{% addtoblock "css" %} + + + +{% endaddtoblock css %} + +{% addtoblock "js" %} + + + + + + + + + + + +{% endaddtoblock %} + {% endblock content %} + +{% include "partials/form.html" %} {% block javascript %} {{ block.super }} {% endblock javascript %} + diff --git a/mhackspace/templates/wiki/includes/formfield.html b/mhackspace/templates/wiki/includes/formfield.html index 9a354fd..9af6533 100644 --- a/mhackspace/templates/wiki/includes/formfield.html +++ b/mhackspace/templates/wiki/includes/formfield.html @@ -12,7 +12,7 @@ {% endif %} -
+
{{ field|addcss:"form-control form-control-danger danger" }} {% if field.errors %} {% for error in field.errors %}