Skip to content

Commit

Permalink
Config option to show hide header config info
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Nov 21, 2012
1 parent 90a342c commit e28ed88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ckan/config/deployment.ini_tmpl
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
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
2 changes: 1 addition & 1 deletion ckan/templates/header.html
@@ -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 e28ed88

Please sign in to comment.