Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
B
bmon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
energy
bmon
Commits
04c3f16b
Commit
04c3f16b
authored
Apr 02, 2020
by
Alan Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved Django-Lockdown settings into a separate file.
parent
705efb2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
bmon/settings_example.py
bmon/settings_example.py
+0
-16
bmon/settings_lockdown.py
bmon/settings_lockdown.py
+29
-0
No files found.
bmon/settings_example.py
View file @
04c3f16b
...
@@ -155,19 +155,3 @@ from .settings_common import *
...
@@ -155,19 +155,3 @@ from .settings_common import *
# ----- If you need to override any of the settings in the 'settings_common.py' file
# ----- If you need to override any of the settings in the 'settings_common.py' file
# ----- do so below this point in this file.
# ----- do so below this point in this file.
# ----- Settings for Lockdown
#INSTALLED_APPS += ('lockdown', )
#MIDDLEWARE += ('lockdown.middleware.LockdownMiddleware',)
#LOCKDOWN_FORM = 'lockdown.forms.AuthForm'
#LOCKDOWN_AUTHFORM_STAFF_ONLY = False
#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 Rb
# r'^st8(\w+)/', # Old URL pattern for storing
# r'^/readingdb/reading/(\w+)/$', # gets all readings for one reading ID
# )
bmon/settings_lockdown.py
0 → 100644
View file @
04c3f16b
# ----- 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
# comment out the "LOCKDOWN_FORM" line.
# 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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment