From dea1a35e93e01f22deabe792e504b01672b313a3 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 20 Jul 2009 05:02:21 +0000 Subject: [PATCH] Turning off logging/debug for Production. I need to make a Staging server that is on the Production environment to a T, except Debug is turned on. --- media/css/reader.css | 3 +++ media/js/newsblur/assetmodel.js | 28 +++++++++++++++------------- settings.py | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/media/css/reader.css b/media/css/reader.css index 8fec0b68a..fea53102f 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -170,6 +170,9 @@ a img { display: block; padding: 4px 0px; } +#story_titles .story.read a.story_title { + color: #575757; +} #story_titles .story .story_title .NB-storytitles-author { padding-left: 12px; diff --git a/media/js/newsblur/assetmodel.js b/media/js/newsblur/assetmodel.js index 8d351cbe9..f02716ef5 100644 --- a/media/js/newsblur/assetmodel.js +++ b/media/js/newsblur/assetmodel.js @@ -42,19 +42,21 @@ NEWSBLUR.AssetModel.Reader.prototype = { success: function(o) { var log_regex = /\s+
'); - var log_js_index_end = log.indexOf(''); - var log_html = log.substring(0, log_js_index_begin); - var log_js = log.substring(log_js_index_begin+31, log_js_index_end); - $('#django_log').replaceWith(log_html); - var js = eval(log_js); + if (log_index) { // Debug is True + var log = o.substring(log_index); + var raw_data = o.substring(0, log_index); + var data = eval('(' + raw_data + ')'); + if(callback && typeof callback == 'function'){ + callback(data); + } + if (log) { + var log_js_index_begin = log.indexOf(''); + var log_html = log.substring(0, log_js_index_begin); + var log_js = log.substring(log_js_index_begin+31, log_js_index_end); + $('#django_log').replaceWith(log_html); + var js = eval(log_js); + } } } }); diff --git a/settings.py b/settings.py index bba26e4eb..ccbd80093 100644 --- a/settings.py +++ b/settings.py @@ -30,7 +30,7 @@ if PRODUCTION: TEMPLATE_DIRS = ( '/home/conesus/newsblur/templates' ) - DEBUG = True + DEBUG = False CACHE_BACKEND = 'locmem:///' logging.basicConfig(level=logging.WARN, format='%(asctime)s %(levelname)s %(message)s',