Skip to content

Commit

Permalink
[#3010] Change the unminified files in production hack
Browse files Browse the repository at this point in the history
Make fanstatic serve files exactly as in development: unminified,
unbundled and with recompute_hashes on, rather than just serving them
unminified. At least unminified and unbunblded are needed to work around
issue #3010.
  • Loading branch information
Sean Hammond committed Nov 1, 2012
1 parent bbdef14 commit 0e2d216
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ckan/config/middleware.py
Expand Up @@ -70,7 +70,10 @@ def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
#app = QueueLogMiddleware(app)

# Fanstatic
if asbool(config.get('debug', False)):
# The 'not' added here is a hack to make CKAN serve unminified, unbundled
# files even in production.
#if asbool(config.get('debug', False)):
if not asbool(config.get('debug', False)):
fanstatic_config = {
'versioning': True,
'recompute_hashes': True,
Expand All @@ -82,9 +85,7 @@ def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
fanstatic_config = {
'versioning': True,
'recompute_hashes': False,
# This is a hack to serve unminified files in production.
#'minified': True,
'minified': False,
'minified': True,
'bottom': True,
'bundle': True,
}
Expand Down

0 comments on commit 0e2d216

Please sign in to comment.