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.

This commit is contained in:
Samuel Clay 2009-07-20 05:02:21 +00:00
parent 311962dad6
commit dea1a35e93
3 changed files with 19 additions and 14 deletions

View file

@ -170,6 +170,9 @@ a img {
display: block; display: block;
padding: 4px 0px; padding: 4px 0px;
} }
#story_titles .story.read a.story_title {
color: #575757;
}
#story_titles .story .story_title .NB-storytitles-author { #story_titles .story .story_title .NB-storytitles-author {
padding-left: 12px; padding-left: 12px;

View file

@ -42,19 +42,21 @@ NEWSBLUR.AssetModel.Reader.prototype = {
success: function(o) { success: function(o) {
var log_regex = /\s+<div id="django_log"([\s|\S])*$/m; var log_regex = /\s+<div id="django_log"([\s|\S])*$/m;
var log_index = o.indexOf('<div id="django_log"'); var log_index = o.indexOf('<div id="django_log"');
var log = o.substring(log_index); if (log_index) { // Debug is True
var raw_data = o.substring(0, log_index); var log = o.substring(log_index);
var data = eval('(' + raw_data + ')'); var raw_data = o.substring(0, log_index);
if(callback && typeof callback == 'function'){ var data = eval('(' + raw_data + ')');
callback(data); if(callback && typeof callback == 'function'){
} callback(data);
if (log) { }
var log_js_index_begin = log.indexOf('<script type="text/javascript">'); if (log) {
var log_js_index_end = log.indexOf('</script>'); var log_js_index_begin = log.indexOf('<script type="text/javascript">');
var log_html = log.substring(0, log_js_index_begin); var log_js_index_end = log.indexOf('</script>');
var log_js = log.substring(log_js_index_begin+31, log_js_index_end); var log_html = log.substring(0, log_js_index_begin);
$('#django_log').replaceWith(log_html); var log_js = log.substring(log_js_index_begin+31, log_js_index_end);
var js = eval(log_js); $('#django_log').replaceWith(log_html);
var js = eval(log_js);
}
} }
} }
}); });

View file

@ -30,7 +30,7 @@ if PRODUCTION:
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
'/home/conesus/newsblur/templates' '/home/conesus/newsblur/templates'
) )
DEBUG = True DEBUG = False
CACHE_BACKEND = 'locmem:///' CACHE_BACKEND = 'locmem:///'
logging.basicConfig(level=logging.WARN, logging.basicConfig(level=logging.WARN,
format='%(asctime)s %(levelname)s %(message)s', format='%(asctime)s %(levelname)s %(message)s',