Show More
@@ -1,8 +1,15 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | # -*- coding: utf-8 -*- | |
2 | # encoding: utf-8 |
|
2 | """ | |
3 | # repos controller for pylons |
|
3 | rhodecode.controllers.admin.repos | |
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 | # |
|
5 | ||
|
6 | Admin controller for RhodeCode | |||
|
7 | ||||
|
8 | :created_on: Apr 7, 2010 | |||
|
9 | :author: marcink | |||
|
10 | :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> | |||
|
11 | :license: GPLv3, see COPYING for more details. | |||
|
12 | """ | |||
6 | # This program is free software; you can redistribute it and/or |
|
13 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
14 | # modify it under the terms of the GNU General Public License | |
8 | # as published by the Free Software Foundation; version 2 |
|
15 | # as published by the Free Software Foundation; version 2 | |
@@ -17,17 +24,18 b'' | |||||
17 | # along with this program; if not, write to the Free Software |
|
24 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
19 | # MA 02110-1301, USA. |
|
26 | # MA 02110-1301, USA. | |
20 | """ |
|
27 | ||
21 | Created on April 7, 2010 |
|
28 | import logging | |
22 | admin controller for pylons |
|
29 | import traceback | |
23 | @author: marcink |
|
30 | import formencode | |
24 | """ |
|
31 | from operator import itemgetter | |
25 | from formencode import htmlfill |
|
32 | from formencode import htmlfill | |
26 | from operator import itemgetter |
|
33 | ||
27 | from paste.httpexceptions import HTTPInternalServerError |
|
34 | from paste.httpexceptions import HTTPInternalServerError | |
28 | from pylons import request, response, session, tmpl_context as c, url |
|
35 | from pylons import request, response, session, tmpl_context as c, url | |
29 | from pylons.controllers.util import abort, redirect |
|
36 | from pylons.controllers.util import abort, redirect | |
30 | from pylons.i18n.translation import _ |
|
37 | from pylons.i18n.translation import _ | |
|
38 | ||||
31 | from rhodecode.lib import helpers as h |
|
39 | from rhodecode.lib import helpers as h | |
32 | from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \ |
|
40 | from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \ | |
33 | HasPermissionAnyDecorator |
|
41 | HasPermissionAnyDecorator | |
@@ -37,9 +45,7 b' from rhodecode.model.db import User' | |||||
37 | from rhodecode.model.forms import RepoForm |
|
45 | from rhodecode.model.forms import RepoForm | |
38 | from rhodecode.model.scm import ScmModel |
|
46 | from rhodecode.model.scm import ScmModel | |
39 | from rhodecode.model.repo import RepoModel |
|
47 | from rhodecode.model.repo import RepoModel | |
40 | import formencode |
|
48 | ||
41 | import logging |
|
|||
42 | import traceback |
|
|||
43 |
|
49 | |||
44 | log = logging.getLogger(__name__) |
|
50 | log = logging.getLogger(__name__) | |
45 |
|
51 | |||
@@ -283,6 +289,7 b' class ReposController(BaseController):' | |||||
283 | category='error') |
|
289 | category='error') | |
284 |
|
290 | |||
285 | return redirect(url('repos')) |
|
291 | return redirect(url('repos')) | |
|
292 | ||||
286 | defaults = c.repo_info.__dict__ |
|
293 | defaults = c.repo_info.__dict__ | |
287 | if c.repo_info.user: |
|
294 | if c.repo_info.user: | |
288 | defaults.update({'user':c.repo_info.user.username}) |
|
295 | defaults.update({'user':c.repo_info.user.username}) |
General Comments 0
You need to be logged in to leave comments.
Login now