Mercurial > public > src > rhodecode
diff pylons_app/controllers/branches.py @ 127:20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 03 May 2010 19:07:54 +0200 |
parents | aec4c0071cb3 |
children | b68b2246e5a6 |
line wrap: on
line diff
--- a/pylons_app/controllers/branches.py Mon May 03 18:31:00 2010 +0200 +++ b/pylons_app/controllers/branches.py Mon May 03 19:07:54 2010 +0200 @@ -1,16 +1,22 @@ import logging -from pylons import request, response, session, tmpl_context as c, url +from pylons import tmpl_context as c, app_globals as g, session, request, config, url from pylons.controllers.util import abort, redirect from pylons_app.lib.base import BaseController, render +from pylons_app.lib.utils import get_repo_slug +from pylons_app.model.hg_model import HgModel +log = logging.getLogger(__name__) -log = logging.getLogger(__name__) class BranchesController(BaseController): + def __before__(self): + c.repos_prefix = config['repos_name'] + c.repo_name = get_repo_slug(request) def index(self): - # Return a rendered template - #return render('/branches.mako') - # or, return a string - return 'Hello World' + hg_model = HgModel() + c.repo_info = hg_model.get_repo(c.repo_name) + c.repo_branches = c.repo_info.branches + + return render('branches/branches.html')