settings_lockdown.py 1.32 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# ----- Settings for Lockdown  
# To use the Lockdown feature, include the following line at the end of the
# 'settings.py' file (without the beginning # character):
# from .settings_lockdown import *

from .settings_common import INSTALLED_APPS, MIDDLEWARE

INSTALLED_APPS += ('lockdown', ) 
MIDDLEWARE += ('lockdown.middleware.LockdownMiddleware',)

# Has the log-in form accept the standar User credentials for determining
# who has access
LOCKDOWN_FORM = 'lockdown.forms.AuthForm'

# Allows users who do not have Staff privileges (ability to add Sensors, Buildings,
# etc.) to view the site if this setting is set to False.
LOCKDOWN_AUTHFORM_STAFF_ONLY = False

# An alternative authorization method: user only has to enter one of
# passwords in the following tuple.  To use this, uncomment line below and
Alan Mitchell's avatar
Alan Mitchell committed
21
# comment out the "LOCKDOWN_FORM" line above.
22 23 24 25 26 27 28 29
# LOCKDOWN_PASSWORDS = ('letmein', 'beta')

LOCKDOWN_URL_EXCEPTIONS = ( r'^/readingdb/reading/(\w+)/store/$',  # URL to store one reading into database
							r'^/readingdb/reading/store/$',        # URL to store multiple readings into database
							r'^/readingdb/reading/store-things/$', # URL to store readings from Things Network
							r'^/readingdb/reading/store-rb/$',     # Store Radio Bridge sensors
							r'^st8(\w+)/',                         # Old URL pattern for storing
						)