55# http://code.djangoproject.com/wiki/SplitSettings
66
77import os
8+ import importlib
9+ import sys
10+ import datetime
11+
812try :
913 import syslog
1014 syslog .openlog ("datatracker" , syslog .LOG_PID , syslog .LOG_USER )
1115except ImportError :
1216 pass
1317
1418BASE_DIR = os .path .dirname (os .path .abspath (__file__ ))
15-
16- # a place to put ajax logs if necessary.
17- LOG_DIR = '/var/log/datatracker'
18-
19- import sys
2019sys .path .append (os .path .abspath (BASE_DIR + "/.." ))
2120
22- import datetime
23-
2421from ietf import __version__
22+ import debug
2523
2624DEBUG = True
2725TEMPLATE_DEBUG = DEBUG
26+ debug .debug = DEBUG
2827
2928# Valid values:
3029# 'production', 'test', 'development'
@@ -693,108 +692,18 @@ def skip_unreadable_post(record):
693692LIST_ACCOUNT_DELAY = 60 * 60 * 25 # 25 hours
694693ACCOUNT_REQUEST_EMAIL = 'account-request@ietf.org'
695694
696- CHART_TYPE_COLUMN_OPTIONS = {
697- "chart" : {
698- "type" : 'column' ,
699- },
700- "credits" : {
701- "enabled" : False ,
702- },
703- "exporting" : {
704- "fallbackToExportServer" : False ,
705- },
706- "rangeSelector" : {
707- "selected" : 5 ,
708- "allButtonsEnabled" : True ,
709- },
710- "series" : [{
711- "name" : "Items" ,
712- "type" : "column" ,
713- "data" : [],
714- "dataGrouping" : {
715- "units" : [[
716- 'week' , # unit name
717- [1 ,], # allowed multiples
718- ], [
719- 'month' ,
720- [1 , 4 ,],
721- ]]
722- },
723- "turboThreshold" : 1 , # Only check format of first data point. All others are the same
724- "pointIntervalUnit" : 'day' ,
725- "pointPadding" : 0.05 ,
726- }],
727- "title" : {
728- "text" : "Items over time"
729- },
730- "xAxis" : {
731- "type" : "datetime" ,
732- # This makes the axis use the given coordinates, rather than
733- # squashing them to equidistant columns
734- "ordinal" : False ,
735- },
736- }
737-
738- CHART_TYPE_ACTIVITY_OPTIONS = {
739- "chart" : {
740- "type" : 'column' ,
741- },
742- "credits" : {
743- "enabled" : False ,
744- },
745- "exporting" : {
746- "fallbackToExportServer" : False ,
747- },
748- "navigation" : {
749- "buttonOptions" : {
750- "enabled" : False ,
751- }
752- },
753- "navigator" : {
754- "enabled" : False ,
755- },
756- "rangeSelector" : {
757- "enabled" : False ,
758- },
759- "scrollbar" : {
760- "enabled" : False ,
761- },
762- "series" : [{
763- "name" : None ,
764- "animation" : False ,
765- "type" : "column" ,
766- "data" : [],
767- "dataGrouping" : {
768- "units" : [[
769- 'year' , # unit name
770- [1 ,], # allowed multiples
771- ]]
772- },
773- "turboThreshold" : 1 , # Only check format of first data point. All others are the same
774- "pointIntervalUnit" : 'day' ,
775- "pointPadding" : - 0.2 ,
776- }],
777- "title" : {
778- "text" : None ,
779- },
780- "xAxis" : {
781- "type" : "datetime" ,
782- # This makes the axis use the given coordinates, rather than
783- # squashing them to equidistant columns
784- "ordinal" : False ,
785- },
786- "yAxis" : {
787- "labels" : {
788- "enabled" : False ,
789- }
790- },
791- }
792695
793696
794697# Put the production SECRET_KEY in settings_local.py, and also any other
795698# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
796699from settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
797700
701+ for app in INSTALLED_APPS :
702+ if app .startswith ('ietf' ):
703+ app_settings_file = os .path .join (app .replace ('.' , os .sep ), "settings.py" )
704+ if os .path .exists (app_settings_file ):
705+ exec "from %s import *" % (app + ".settings" )
706+
798707# Add DEV_APPS to INSTALLED_APPS
799708INSTALLED_APPS += DEV_APPS
800709MIDDLEWARE_CLASSES += DEV_MIDDLEWARE_CLASSES
@@ -817,5 +726,6 @@ def skip_unreadable_post(record):
817726
818727 if 'SECRET_KEY' not in locals ():
819728 SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'
729+
820730 ALLOWED_HOSTS = ['*' ,]
821731
0 commit comments