Skip to content

Commit

Permalink
Merge pull request #181 from okfn/debug-header-info
Browse files Browse the repository at this point in the history
Debug header info
  • Loading branch information
johnmartin committed Nov 22, 2012
2 parents 79edb76 + 3bffcb8 commit c81ee8f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ckan/config/deployment.ini_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ ckan.feeds.author_link =
#ofs.aws_access_key_id = ....
#ofs.aws_secret_access_key = ....


# DEBUGGING

# ckan.debug_supress_header This option can be set to suppress the debug
# information showing the controller and action recieving the request being
# shown in the header. Note: This info only shows if debug is set to true.
ckan.debug_supress_header = false

## ===================================
## Extensions

Expand Down
2 changes: 2 additions & 0 deletions ckan/lib/app_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,7 @@ def _init(self):
datasets_per_page = int(config.get('ckan.datasets_per_page', '20'))
self.datasets_per_page = datasets_per_page

self.debug_supress_header = asbool(config.get('ckan.debug_supress_header', 'false'))

app_globals = _Globals()
del _Globals
4 changes: 1 addition & 3 deletions ckan/public/base/less/masthead.less
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,9 @@ header.masthead {

.debug {
position: absolute;
bottom: 10px;
top: 10px;
left: 10px;
font-size: 11px;
color: rgba(255, 255, 255, 0.5);
line-height: 1.2;
}

}
2 changes: 1 addition & 1 deletion ckan/templates/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<header class="masthead">
{% if config.debug %}
{% if config.debug and not g.debug_supress_header %}
<div class="debug">Controller : {{ c.controller }}<br/>Action : {{ c.action }}</div>
{% endif %}
<div class="container">
Expand Down

0 comments on commit c81ee8f

Please sign in to comment.