Mercurial > kallithea
diff rhodecode/controllers/settings.py @ 1045:3fc9183e05dd beta
another major codes rewrite:
- created BaseRepo controller for all repo specific controller, and added common data propagation
- removed obosete codes, and made optimizations, removed to often calls to RepoModel
- fixed found bugs in files controller that generated unhandled 500 errors
- cache issues
- removed repo_branches global template values
- journal fixes
- main repo list is fully dict now it's less resource heavy that way
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 15 Feb 2011 01:36:07 +0100 |
parents | 65129c332d37 |
children | 32dbf759fa98 |
line wrap: on
line diff
--- a/rhodecode/controllers/settings.py Mon Feb 14 16:43:57 2011 +0100 +++ b/rhodecode/controllers/settings.py Tue Feb 15 01:36:07 2011 +0100 @@ -29,7 +29,6 @@ import traceback import formencode -from formencode import htmlfill from pylons import tmpl_context as c, request, url from pylons.controllers.util import redirect @@ -37,7 +36,7 @@ import rhodecode.lib.helpers as h from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAllDecorator -from rhodecode.lib.base import BaseController, render +from rhodecode.lib.base import BaseRepoController, render from rhodecode.lib.utils import invalidate_cache, action_logger from rhodecode.model.forms import RepoSettingsForm, RepoForkForm from rhodecode.model.repo import RepoModel @@ -45,7 +44,7 @@ log = logging.getLogger(__name__) -class SettingsController(BaseController): +class SettingsController(BaseRepoController): @LoginRequired() @HasRepoPermissionAllDecorator('repository.admin') @@ -87,7 +86,7 @@ defaults.update({'g_perm_%s' % p.users_group.users_group_name: p.permission.permission_name}) - return htmlfill.render( + return formencode.htmlfill.render( render('settings/repo_settings.html'), defaults=defaults, encoding="UTF-8", @@ -111,7 +110,7 @@ c.repo_info = repo_model.get_by_repo_name(repo_name) c.users_array = repo_model.get_users_js() errors.value.update({'user':c.repo_info.user.username}) - return htmlfill.render( + return formencode.htmlfill.render( render('settings/repo_settings.html'), defaults=errors.value, errors=errors.error_dict or {}, @@ -192,7 +191,7 @@ c.new_repo = errors.value['fork_name'] r = render('settings/repo_fork.html') - return htmlfill.render( + return formencode.htmlfill.render( r, defaults=errors.value, errors=errors.error_dict or {},