Browse Source

Passando a utilizar o pacote maintenancemode para o modo de site em manutenção.

0.2
Guilherme Gondim 17 years ago
parent
commit
f22b6dcdf9
  1. 5
      sigi/local_settings.template
  2. 4
      sigi/settings.py

5
sigi/local_settings.template

@ -12,7 +12,7 @@
#DEBUG = True #DEBUG = True
#TEMPLATE_DEBUG = DEBUG #TEMPLATE_DEBUG = DEBUG
#MAINTENANCE_MODE = False
#################################### ####################################
## TEMPLATE FOR USE IN PRODUCTION ## ## TEMPLATE FOR USE IN PRODUCTION ##
@ -20,8 +20,7 @@
#DEBUG = False #DEBUG = False
#TEMPLATE_DEBUG = DEBUG #TEMPLATE_DEBUG = DEBUG
#MAINTENANCE = True #MAINTENANCE_MODE = False
#ADMINS = (('root', 'root@localhost'),) #ADMINS = (('root', 'root@localhost'),)
#MANAGERS = ADMINS #MANAGERS = ADMINS

4
sigi/settings.py

@ -14,7 +14,6 @@ PROJECT_DIR = BASE_DIR + '/sigi'
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
MAINTENANCE = False
# I can't determine this, use local_settings.py. # I can't determine this, use local_settings.py.
ADMINS = (('root', 'root@localhost'),) ADMINS = (('root', 'root@localhost'),)
@ -42,6 +41,8 @@ CACHE_MIDDLEWARE_SECONDS = 60
CACHE_MIDDLEWARE_KEY_PREFIX = 'sigi' CACHE_MIDDLEWARE_KEY_PREFIX = 'sigi'
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = False CACHE_MIDDLEWARE_ANONYMOUS_ONLY = False
MAINTENANCE_MODE = False
# Used to provide a seed in secret-key hashing algorithms. Set this to # Used to provide a seed in secret-key hashing algorithms. Set this to
# a random string in your local_settings.py - the longer, the better. # a random string in your local_settings.py - the longer, the better.
SECRET_KEY = 'set-this-in-your-local_settings.py!' SECRET_KEY = 'set-this-in-your-local_settings.py!'
@ -64,6 +65,7 @@ MIDDLEWARE_CLASSES = (
'django.middleware.gzip.GZipMiddleware', 'django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'maintenancemode.middleware.MaintenanceModeMiddleware',
'django.middleware.cache.CacheMiddleware', 'django.middleware.cache.CacheMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware', 'django.middleware.doc.XViewMiddleware',

Loading…
Cancel
Save