##// END OF EJS Templates
Added changeset controllers
marcink -
r103:665b3449 default
parent child Browse files
Show More
@@ -0,0 +1,20 b''
1 import logging
2
3 from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
4 from pylons.controllers.util import abort, redirect
5
6 from pylons_app.lib.base import BaseController, render
7 from pylons_app.lib.utils import get_repo_slug
8 from pylons_app.model.hg_model import HgModel
9 log = logging.getLogger(__name__)
10
11 class ChangesetController(BaseController):
12 def __before__(self):
13 c.repos_prefix = config['repos_name']
14 c.repo_name = get_repo_slug(request)
15
16 def index(self):
17 # Return a rendered template
18 #return render('/changeset.mako')
19 # or, return a string
20 return 'Hello World'
@@ -0,0 +1,7 b''
1 from pylons_app.tests import *
2
3 class TestChangesetController(TestController):
4
5 def test_index(self):
6 response = self.app.get(url(controller='changeset', action='index'))
7 # Test response...
@@ -32,6 +32,7 b' def make_map(config):'
32 32 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo')
33 33
34 34
35 map.connect('changeset_home', '/{repo_name}/changeset/{revision}', controller='changeset', revision='tip')
35 36 map.connect('summary_home', '/{repo_name}/summary', controller='summary')
36 37 map.connect('changelog_home', '/{repo_name}/changelog', controller='changelog')
37 38 map.connect('branches_home', '/{repo_name}/branches', controller='branches')
General Comments 0
You need to be logged in to leave comments. Login now