diff --git a/ietf/doc/settings.py b/ietf/doc/settings.py new file mode 100644 index 000000000..0a31d9dba --- /dev/null +++ b/ietf/doc/settings.py @@ -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, + } + }, +} + diff --git a/ietf/settings.py b/ietf/settings.py index f636f45bd..3a9e3376f 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -5,6 +5,10 @@ # http://code.djangoproject.com/wiki/SplitSettings import os +import importlib +import sys +import datetime + try: import syslog syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER) @@ -12,19 +16,14 @@ except ImportError: pass 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 + "/..")) -import datetime - from ietf import __version__ +import debug DEBUG = True TEMPLATE_DEBUG = DEBUG +debug.debug = DEBUG # Valid values: # 'production', 'test', 'development' @@ -693,108 +692,18 @@ MAILMAN_LIB_DIR = '/usr/lib/mailman' LIST_ACCOUNT_DELAY = 60*60*25 # 25 hours 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 # sensitive or site-specific changes. DO NOT commit settings_local.py to svn. 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 INSTALLED_APPS += DEV_APPS MIDDLEWARE_CLASSES += DEV_MIDDLEWARE_CLASSES @@ -817,5 +726,6 @@ if SERVER_MODE != 'production': if 'SECRET_KEY' not in locals(): SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka' + ALLOWED_HOSTS = ['*',]