Skip to content
Snippets Groups Projects
Commit d2b3db02 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added maintenance mode feature for the site using the module django-maintenancemode

parent 2941aa8f
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ import os ...@@ -26,6 +26,7 @@ import os
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
DEBUG = True DEBUG = True
MAINTENANCE_MODE = False
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
# Hosts/domain names that are valid for this site; required if DEBUG is False # Hosts/domain names that are valid for this site; required if DEBUG is False
......
...@@ -93,6 +93,7 @@ MIDDLEWARE_CLASSES = ( ...@@ -93,6 +93,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'common.middleware.whodid.WhodidMiddleware', 'common.middleware.whodid.WhodidMiddleware',
'django.middleware.locale.LocaleMiddleware', 'django.middleware.locale.LocaleMiddleware',
'maintenancemode.middleware.MaintenanceModeMiddleware',
# Uncomment the next line for simple clickjacking protection: # Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
) )
......
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Temporarily down for maintenance" %}{% endblock %}
{% block content %}
<h1>{% trans "Temporarily down for maintenance" %}</h1>
<p>{% trans "We are sorry, but the web site is currently underdoing maintenance. We should be back online shortly." %}</p>
{% endblock %}
...@@ -23,3 +23,4 @@ Pillow ...@@ -23,3 +23,4 @@ Pillow
requests==2.0.1 requests==2.0.1
django-tinymce django-tinymce
python-dateutil==1.5 python-dateutil==1.5
django-maintenancemode
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment