From: Javyer Der Derian Date: Thu, 17 Apr 2014 21:57:23 +0000 (-0300) Subject: Merge pull request #26 from udacity/remove_dj_version X-Git-Tag: live~24 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/183aa1f98a61acb441e082951ff8c24c93cfcc27?hp=-c Merge pull request #26 from udacity/remove_dj_version Remove DJANGO_VERSION from the recommended settings --- 183aa1f98a61acb441e082951ff8c24c93cfcc27 diff --combined settings_local.py.dist index 896a433,9ac25a5..81c1eaa --- a/settings_local.py.dist +++ b/settings_local.py.dist @@@ -3,33 -3,14 +3,33 @@@ import os.pat SITE_SRC_ROOT = os.path.dirname(__file__) LOG_FILENAME = 'django.osqa.log' - -#for logging -import logging -logging.basicConfig( - filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), - level=logging.ERROR, - format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s', -) +LOGGING = { + 'version': 1, + 'formatters': { + 'default': { + 'format': '%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s', + } + }, + 'handlers': { + 'file': { + 'level': 'DEBUG', + 'class': 'logging.FileHandler', + 'formatter': 'default', + 'filename': os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), + }, + }, + 'loggers' : { + # ensure that all log entries are propagated to root + 'django': { 'propagate': True }, + 'django.request': { 'propagate': True }, + 'django.security': { 'propagate': True }, + 'py.warnings': { 'propagate': True }, + }, + 'root': { + 'handlers': ['file'], + 'level': 'DEBUG', + }, +} #ADMINS and MANAGERS ADMINS = () @@@ -41,7 -22,7 +41,7 @@@ DEBUG_TOOLBAR_CONFIG = } TEMPLATE_DEBUG = DEBUG INTERNAL_IPS = ('127.0.0.1',) - +ALLOWED_HOSTS = ('yourhostname.com',) DATABASES = { 'default': { @@@ -51,7 -32,6 +51,7 @@@ 'PASSWORD': '', 'HOST': '', 'PORT': '', + 'CONN_MAX_AGE': 600, } } @@@ -72,7 -52,6 +72,6 @@@ TIME_ZONE = 'America/New_York USE_I18N = True LANGUAGE_CODE = 'en' - DJANGO_VERSION = 1.1 OSQA_DEFAULT_SKIN = 'default' DISABLED_MODULES = ['books', 'recaptcha', 'project_badges']