Mercurial > public > src > rhodecode
diff pylons_app/controllers/hg.py @ 74:cdf4fda66dd9
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
author | Marcin Kuzminski <marcin@python-blog.com> |
---|---|
date | Mon, 12 Apr 2010 10:29:18 +0200 |
parents | 8fb1abd4178a |
children | 71401840ed86 |
line wrap: on
line diff
--- a/pylons_app/controllers/hg.py Sun Apr 11 22:57:16 2010 +0200 +++ b/pylons_app/controllers/hg.py Mon Apr 12 10:29:18 2010 +0200 @@ -39,6 +39,10 @@ def view(self, *args, **kwargs): #TODO: reimplement this not tu use hgwebdir + + vcs_impl = self._get_vcs_impl(request.environ) + if vcs_impl: + return vcs_impl response = g.hgapp(request.environ, self.start_response) http_accept = request.environ.get('HTTP_ACCEPT', False) @@ -63,3 +67,18 @@ return template.render(g=g, c=c, session=session, h=h) + + + + + def _get_vcs_impl(self, environ): + path_info = environ['PATH_INFO'] + c.repo_name = path_info.split('/')[-2] + action = path_info.split('/')[-1] + if not action.startswith('_'): + return False + else: + hg_model = HgModel() + c.repo_info = hg_model.get_repo(c.repo_name) + c.repo_changesets = c.repo_info.get_changesets(10) + return render('/summary.html')