annotate pylons_app/controllers/changeset.py @ 103:665b344927f4

Added changeset controllers
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 25 Apr 2010 22:16:05 +0200
parents
children 50a39f923f31
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
103
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 import logging
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 from pylons.controllers.util import abort, redirect
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 from pylons_app.lib.base import BaseController, render
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 from pylons_app.lib.utils import get_repo_slug
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 from pylons_app.model.hg_model import HgModel
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 log = logging.getLogger(__name__)
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 class ChangesetController(BaseController):
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 def __before__(self):
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 c.repos_prefix = config['repos_name']
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 c.repo_name = get_repo_slug(request)
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 def index(self):
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 # Return a rendered template
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 #return render('/changeset.mako')
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 # or, return a string
665b344927f4 Added changeset controllers
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 return 'Hello World'