Show More
@@ -4,7 +4,6 b' from pylons import request, response, se' | |||||
4 | from pylons.controllers.util import abort, redirect |
|
4 | from pylons.controllers.util import abort, redirect | |
5 | from pylons_app.lib import auth |
|
5 | from pylons_app.lib import auth | |
6 | from pylons_app.lib.base import BaseController, render |
|
6 | from pylons_app.lib.base import BaseController, render | |
7 | from pylons_app.model import meta |
|
|||
8 | from pylons_app.model.db import Users, UserLogs |
|
7 | from pylons_app.model.db import Users, UserLogs | |
9 | from pylons_app.lib.auth import authenticate |
|
8 | from pylons_app.lib.auth import authenticate | |
10 | from pylons_app.model.hg_model import HgModel |
|
9 | from pylons_app.model.hg_model import HgModel | |
@@ -21,10 +20,8 b' class ReposController(BaseController):' | |||||
21 |
|
20 | |||
22 | @authenticate |
|
21 | @authenticate | |
23 | def __before__(self): |
|
22 | def __before__(self): | |
24 |
|
||||
25 | c.admin_user = session.get('admin_user') |
|
23 | c.admin_user = session.get('admin_user') | |
26 | c.admin_username = session.get('admin_username') |
|
24 | c.admin_username = session.get('admin_username') | |
27 | self.sa = meta.Session |
|
|||
28 |
|
25 | |||
29 | def index(self, format='html'): |
|
26 | def index(self, format='html'): | |
30 | """GET /repos: All items in the collection""" |
|
27 | """GET /repos: All items in the collection""" |
@@ -5,7 +5,6 b' from pylons.controllers.util import abor' | |||||
5 |
|
5 | |||
6 | from pylons_app.lib.base import BaseController, render |
|
6 | from pylons_app.lib.base import BaseController, render | |
7 | from formencode import htmlfill |
|
7 | from formencode import htmlfill | |
8 | from pylons_app.model import meta |
|
|||
9 | from pylons_app.model.db import Users, UserLogs |
|
8 | from pylons_app.model.db import Users, UserLogs | |
10 | from pylons_app.lib.auth import authenticate |
|
9 | from pylons_app.lib.auth import authenticate | |
11 | import crypt |
|
10 | import crypt | |
@@ -20,10 +19,8 b' class UsersController(BaseController):' | |||||
20 |
|
19 | |||
21 | @authenticate |
|
20 | @authenticate | |
22 | def __before__(self): |
|
21 | def __before__(self): | |
23 |
|
||||
24 | c.admin_user = session.get('admin_user') |
|
22 | c.admin_user = session.get('admin_user') | |
25 | c.admin_username = session.get('admin_username') |
|
23 | c.admin_username = session.get('admin_username') | |
26 | self.sa = meta.Session |
|
|||
27 |
|
24 | |||
28 | def index(self, format='html'): |
|
25 | def index(self, format='html'): | |
29 | """GET /users: All items in the collection""" |
|
26 | """GET /users: All items in the collection""" |
@@ -21,6 +21,7 b' class BaseController(WSGIController):' | |||||
21 | # the request is routed to. This routing information is |
|
21 | # the request is routed to. This routing information is | |
22 | # available in environ['pylons.routes_dict'] |
|
22 | # available in environ['pylons.routes_dict'] | |
23 | c.repo_list = _get_repos() |
|
23 | c.repo_list = _get_repos() | |
|
24 | self.sa = meta.Session | |||
24 | try: |
|
25 | try: | |
25 | return WSGIController.__call__(self, environ, start_response) |
|
26 | return WSGIController.__call__(self, environ, start_response) | |
26 | finally: |
|
27 | finally: |
General Comments 0
You need to be logged in to leave comments.
Login now