Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
energy
bmon
Commits
577cb371
Commit
577cb371
authored
Feb 05, 2015
by
Alan Mitchell
Browse files
Merge branch 'master' into test_performance
parents
c4f21512
0b87314b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
bmon/settings_example.py
bmon/settings_example.py
+7
-7
bmsapp/logging_setup.py
bmsapp/logging_setup.py
+1
-1
No files found.
bmon/settings_example.py
View file @
577cb371
...
...
@@ -50,16 +50,16 @@ BMSAPP_NAV_LINKS = ( ('Map', 'map'),
# Name of this Django project. Note that if you change this from bmon, you will also
# have to change values in the manage.py, wsgi.py, and appache2/conf/httpd.conf files.
PROJ_NAME
=
'bmon'
BMSAPP_
PROJ_NAME
=
'bmon'
# This is the name you gave to the Static application created in the Webfaction Control
# Panel to serve static Django media. This is only used to create the STATIC_ROOT setting
# further down in this settings file.
STATIC_APP_NAME
=
'bmon_static'
BMSAPP_
STATIC_APP_NAME
=
'bmon_static'
# This controls what messages will actually get logged
# Levels in order from least to greatest severity are: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL
=
logging
.
INFO
BMSAPP_
LOG_LEVEL
=
logging
.
INFO
#------------ End of Settings Specific to the Monitoring App --------------
...
...
@@ -132,7 +132,7 @@ MANAGERS = ADMINS
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
# Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME'
:
join
(
PROJ_PATH
,
'%s.sqlite'
%
PROJ_NAME
),
# Or path to database file if using sqlite3.
'NAME'
:
join
(
PROJ_PATH
,
'%s.sqlite'
%
BMSAPP_
PROJ_NAME
),
# Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER'
:
''
,
'PASSWORD'
:
''
,
...
...
@@ -167,7 +167,7 @@ MEDIA_URL = ''
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT
=
join
(
PROJ_PATH
,
'..'
,
'..'
,
STATIC_APP_NAME
)
STATIC_ROOT
=
join
(
PROJ_PATH
,
'..'
,
'..'
,
BMSAPP_
STATIC_APP_NAME
)
# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
...
...
@@ -206,10 +206,10 @@ MIDDLEWARE_CLASSES = (
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF
=
'%s.urls'
%
PROJ_NAME
ROOT_URLCONF
=
'%s.urls'
%
BMSAPP_
PROJ_NAME
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION
=
'%s.wsgi.application'
%
PROJ_NAME
WSGI_APPLICATION
=
'%s.wsgi.application'
%
BMSAPP_
PROJ_NAME
TEMPLATE_DIRS
=
(
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
...
...
bmsapp/logging_setup.py
View file @
577cb371
...
...
@@ -15,7 +15,7 @@ LOG_FILE = join(APP_PATH, 'logs', 'bms.log')
logger
=
logging
.
getLogger
(
'bms'
)
# set the log level
logger
.
setLevel
(
getattr
(
settings
,
'LOG_LEVEL'
,
logging
.
INFO
))
logger
.
setLevel
(
getattr
(
settings
,
'
BMSAPP_
LOG_LEVEL'
,
logging
.
INFO
))
# create a rotating file handler
fh
=
logging
.
handlers
.
RotatingFileHandler
(
LOG_FILE
,
maxBytes
=
200000
,
backupCount
=
5
)
...
...
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