changeset 312:91ba8489119a

another small fix for error controller
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 29 Jun 2010 13:16:51 +0200
parents 9a70fe918a81
children eb378708377e
files pylons_app/controllers/error.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/controllers/error.py	Tue Jun 29 13:13:09 2010 +0200
+++ b/pylons_app/controllers/error.py	Tue Jun 29 13:16:51 2010 +0200
@@ -9,6 +9,7 @@
 from pylons.middleware import  media_path
 from pylons_app.lib.utils import check_repo
 import pylons_app.lib.helpers as h
+from pylons_app import __version__
 log = logging.getLogger(__name__)
 
 class ErrorController(BaseController):
@@ -38,6 +39,7 @@
         if resp.status_int == 404:
             org_e = request.environ.get('pylons.original_request').environ
             c.repo_name = repo_name = org_e['PATH_INFO'].split('/')[1]
+            c.hg_app_version = __version__
             c.repo_name_cleaned = h.repo_name_slug(c.repo_name)
             if check_repo(repo_name, g.base_path):
                 return render('/errors/error_404.html')