Permalink
Browse files

reuse logical alias

  • Loading branch information...
1 parent fdb88f1 commit 8af25a58d1827ac039c8a290a2b8f59e6c77647c @mcdonc mcdonc committed Jul 15, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 pyramid_jqm/scaffolds/jqm_starter/+package+/views.py_tmpl
View
10 pyramid_jqm/scaffolds/jqm_starter/+package+/views.py_tmpl
@@ -5,15 +5,15 @@ from pkg_resources import get_distribution
from pyramid.view import static_view
from pyramid.view import view_config
-# www is a view for static files; it will be found when all other
-# views fail to be found (it's a NotFound view)
-www = static_view('{{package}}:static', cache_max_age=86400)
-www = view_config(context='pyramid.exceptions.NotFound')(www)
-
cache_one_hour = 3600
cache_one_day = 86400
never_cache = 0
+# www is a view for static files; it will be found when all other
+# views fail to be found (it's a NotFound view)
+www = static_view('{{package}}:static', cache_max_age=cache_one_day)
+www = view_config(context='pyramid.exceptions.NotFound')(www)
+
@view_config(name='versions.json', renderer='json', http_cache=cache_one_hour)
def versions(request):
pjqm_dist = get_distribution('pyramid_jqm')

0 comments on commit 8af25a5

Please sign in to comment.