Started moving app-specific settings into app settings.py files.
- Legacy-Id: 11949
This commit is contained in:
parent
67415af1e1
commit
545140d939
97
ietf/doc/settings.py
Normal file
97
ietf/doc/settings.py
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
CHART_TYPE_COLUMN_OPTIONS = {
|
||||||
|
"chart": {
|
||||||
|
"type": 'column',
|
||||||
|
},
|
||||||
|
"credits": {
|
||||||
|
"enabled": False,
|
||||||
|
},
|
||||||
|
"exporting": {
|
||||||
|
"fallbackToExportServer": False,
|
||||||
|
},
|
||||||
|
"rangeSelector" : {
|
||||||
|
"selected": 5,
|
||||||
|
"allButtonsEnabled": True,
|
||||||
|
},
|
||||||
|
"series" : [{
|
||||||
|
"name" : "Items",
|
||||||
|
"type" : "column",
|
||||||
|
"data" : [],
|
||||||
|
"dataGrouping": {
|
||||||
|
"units": [[
|
||||||
|
'week', # unit name
|
||||||
|
[1,], # allowed multiples
|
||||||
|
], [
|
||||||
|
'month',
|
||||||
|
[1, 4,],
|
||||||
|
]]
|
||||||
|
},
|
||||||
|
"turboThreshold": 1, # Only check format of first data point. All others are the same
|
||||||
|
"pointIntervalUnit": 'day',
|
||||||
|
"pointPadding": 0.05,
|
||||||
|
}],
|
||||||
|
"title" : {
|
||||||
|
"text" : "Items over time"
|
||||||
|
},
|
||||||
|
"xAxis": {
|
||||||
|
"type": "datetime",
|
||||||
|
# This makes the axis use the given coordinates, rather than
|
||||||
|
# squashing them to equidistant columns
|
||||||
|
"ordinal": False,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
CHART_TYPE_ACTIVITY_OPTIONS = {
|
||||||
|
"chart": {
|
||||||
|
"type": 'column',
|
||||||
|
},
|
||||||
|
"credits": {
|
||||||
|
"enabled": False,
|
||||||
|
},
|
||||||
|
"exporting": {
|
||||||
|
"fallbackToExportServer": False,
|
||||||
|
},
|
||||||
|
"navigation": {
|
||||||
|
"buttonOptions": {
|
||||||
|
"enabled": False,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"navigator": {
|
||||||
|
"enabled": False,
|
||||||
|
},
|
||||||
|
"rangeSelector" : {
|
||||||
|
"enabled": False,
|
||||||
|
},
|
||||||
|
"scrollbar": {
|
||||||
|
"enabled": False,
|
||||||
|
},
|
||||||
|
"series" : [{
|
||||||
|
"name" : None,
|
||||||
|
"animation": False,
|
||||||
|
"type" : "column",
|
||||||
|
"data" : [],
|
||||||
|
"dataGrouping": {
|
||||||
|
"units": [[
|
||||||
|
'year', # unit name
|
||||||
|
[1,], # allowed multiples
|
||||||
|
]]
|
||||||
|
},
|
||||||
|
"turboThreshold": 1, # Only check format of first data point. All others are the same
|
||||||
|
"pointIntervalUnit": 'day',
|
||||||
|
"pointPadding": -0.2,
|
||||||
|
}],
|
||||||
|
"title" : {
|
||||||
|
"text" : None,
|
||||||
|
},
|
||||||
|
"xAxis": {
|
||||||
|
"type": "datetime",
|
||||||
|
# This makes the axis use the given coordinates, rather than
|
||||||
|
# squashing them to equidistant columns
|
||||||
|
"ordinal": False,
|
||||||
|
},
|
||||||
|
"yAxis": {
|
||||||
|
"labels": {
|
||||||
|
"enabled": False,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
116
ietf/settings.py
116
ietf/settings.py
|
@ -5,6 +5,10 @@
|
||||||
# http://code.djangoproject.com/wiki/SplitSettings
|
# http://code.djangoproject.com/wiki/SplitSettings
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import importlib
|
||||||
|
import sys
|
||||||
|
import datetime
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import syslog
|
import syslog
|
||||||
syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER)
|
syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER)
|
||||||
|
@ -12,19 +16,14 @@ except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# a place to put ajax logs if necessary.
|
|
||||||
LOG_DIR = '/var/log/datatracker'
|
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.path.append(os.path.abspath(BASE_DIR + "/.."))
|
sys.path.append(os.path.abspath(BASE_DIR + "/.."))
|
||||||
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
from ietf import __version__
|
from ietf import __version__
|
||||||
|
import debug
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
debug.debug = DEBUG
|
||||||
|
|
||||||
# Valid values:
|
# Valid values:
|
||||||
# 'production', 'test', 'development'
|
# 'production', 'test', 'development'
|
||||||
|
@ -693,108 +692,18 @@ MAILMAN_LIB_DIR = '/usr/lib/mailman'
|
||||||
LIST_ACCOUNT_DELAY = 60*60*25 # 25 hours
|
LIST_ACCOUNT_DELAY = 60*60*25 # 25 hours
|
||||||
ACCOUNT_REQUEST_EMAIL = 'account-request@ietf.org'
|
ACCOUNT_REQUEST_EMAIL = 'account-request@ietf.org'
|
||||||
|
|
||||||
CHART_TYPE_COLUMN_OPTIONS = {
|
|
||||||
"chart": {
|
|
||||||
"type": 'column',
|
|
||||||
},
|
|
||||||
"credits": {
|
|
||||||
"enabled": False,
|
|
||||||
},
|
|
||||||
"exporting": {
|
|
||||||
"fallbackToExportServer": False,
|
|
||||||
},
|
|
||||||
"rangeSelector" : {
|
|
||||||
"selected": 5,
|
|
||||||
"allButtonsEnabled": True,
|
|
||||||
},
|
|
||||||
"series" : [{
|
|
||||||
"name" : "Items",
|
|
||||||
"type" : "column",
|
|
||||||
"data" : [],
|
|
||||||
"dataGrouping": {
|
|
||||||
"units": [[
|
|
||||||
'week', # unit name
|
|
||||||
[1,], # allowed multiples
|
|
||||||
], [
|
|
||||||
'month',
|
|
||||||
[1, 4,],
|
|
||||||
]]
|
|
||||||
},
|
|
||||||
"turboThreshold": 1, # Only check format of first data point. All others are the same
|
|
||||||
"pointIntervalUnit": 'day',
|
|
||||||
"pointPadding": 0.05,
|
|
||||||
}],
|
|
||||||
"title" : {
|
|
||||||
"text" : "Items over time"
|
|
||||||
},
|
|
||||||
"xAxis": {
|
|
||||||
"type": "datetime",
|
|
||||||
# This makes the axis use the given coordinates, rather than
|
|
||||||
# squashing them to equidistant columns
|
|
||||||
"ordinal": False,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
CHART_TYPE_ACTIVITY_OPTIONS = {
|
|
||||||
"chart": {
|
|
||||||
"type": 'column',
|
|
||||||
},
|
|
||||||
"credits": {
|
|
||||||
"enabled": False,
|
|
||||||
},
|
|
||||||
"exporting": {
|
|
||||||
"fallbackToExportServer": False,
|
|
||||||
},
|
|
||||||
"navigation": {
|
|
||||||
"buttonOptions": {
|
|
||||||
"enabled": False,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"navigator": {
|
|
||||||
"enabled": False,
|
|
||||||
},
|
|
||||||
"rangeSelector" : {
|
|
||||||
"enabled": False,
|
|
||||||
},
|
|
||||||
"scrollbar": {
|
|
||||||
"enabled": False,
|
|
||||||
},
|
|
||||||
"series" : [{
|
|
||||||
"name" : None,
|
|
||||||
"animation": False,
|
|
||||||
"type" : "column",
|
|
||||||
"data" : [],
|
|
||||||
"dataGrouping": {
|
|
||||||
"units": [[
|
|
||||||
'year', # unit name
|
|
||||||
[1,], # allowed multiples
|
|
||||||
]]
|
|
||||||
},
|
|
||||||
"turboThreshold": 1, # Only check format of first data point. All others are the same
|
|
||||||
"pointIntervalUnit": 'day',
|
|
||||||
"pointPadding": -0.2,
|
|
||||||
}],
|
|
||||||
"title" : {
|
|
||||||
"text" : None,
|
|
||||||
},
|
|
||||||
"xAxis": {
|
|
||||||
"type": "datetime",
|
|
||||||
# This makes the axis use the given coordinates, rather than
|
|
||||||
# squashing them to equidistant columns
|
|
||||||
"ordinal": False,
|
|
||||||
},
|
|
||||||
"yAxis": {
|
|
||||||
"labels": {
|
|
||||||
"enabled": False,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Put the production SECRET_KEY in settings_local.py, and also any other
|
# Put the production SECRET_KEY in settings_local.py, and also any other
|
||||||
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
|
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
|
||||||
from settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
|
from settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
|
||||||
|
|
||||||
|
for app in INSTALLED_APPS:
|
||||||
|
if app.startswith('ietf'):
|
||||||
|
app_settings_file = os.path.join(app.replace('.', os.sep), "settings.py")
|
||||||
|
if os.path.exists(app_settings_file):
|
||||||
|
exec "from %s import *" % (app+".settings")
|
||||||
|
|
||||||
# Add DEV_APPS to INSTALLED_APPS
|
# Add DEV_APPS to INSTALLED_APPS
|
||||||
INSTALLED_APPS += DEV_APPS
|
INSTALLED_APPS += DEV_APPS
|
||||||
MIDDLEWARE_CLASSES += DEV_MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES += DEV_MIDDLEWARE_CLASSES
|
||||||
|
@ -817,5 +726,6 @@ if SERVER_MODE != 'production':
|
||||||
|
|
||||||
if 'SECRET_KEY' not in locals():
|
if 'SECRET_KEY' not in locals():
|
||||||
SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'
|
SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*',]
|
ALLOWED_HOSTS = ['*',]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue