diff --git a/MANIFEST.in b/MANIFEST.in --- a/MANIFEST.in +++ b/MANIFEST.in @@ -29,8 +29,6 @@ recursive-include rhodecode *.mako # 502 page include rhodecode/public/502.html -# 502 page -include rhodecode/public/502.html # images, css include rhodecode/public/css/*.css diff --git a/rhodecode/admin/views.py b/rhodecode/admin/views.py --- a/rhodecode/admin/views.py +++ b/rhodecode/admin/views.py @@ -48,7 +48,7 @@ class AdminSettingsView(object): @HasPermissionAllDecorator('hg.admin') @view_config( route_name='admin_settings_open_source', request_method='GET', - renderer='rhodecode:templates/admin/settings/settings.html') + renderer='rhodecode:templates/admin/settings/settings.mako') def open_source_licenses(self): c.active = 'open_source' c.navlist = navigation_list(self.request) diff --git a/rhodecode/authentication/plugins/auth_crowd.py b/rhodecode/authentication/plugins/auth_crowd.py --- a/rhodecode/authentication/plugins/auth_crowd.py +++ b/rhodecode/authentication/plugins/auth_crowd.py @@ -197,14 +197,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=CrowdAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=CrowdAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_headers.py b/rhodecode/authentication/plugins/auth_headers.py --- a/rhodecode/authentication/plugins/auth_headers.py +++ b/rhodecode/authentication/plugins/auth_headers.py @@ -83,14 +83,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=HeadersAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=HeadersAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_jasig_cas.py b/rhodecode/authentication/plugins/auth_jasig_cas.py --- a/rhodecode/authentication/plugins/auth_jasig_cas.py +++ b/rhodecode/authentication/plugins/auth_jasig_cas.py @@ -74,14 +74,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=JasigCasAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=JasigCasAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_ldap.py b/rhodecode/authentication/plugins/auth_ldap.py --- a/rhodecode/authentication/plugins/auth_ldap.py +++ b/rhodecode/authentication/plugins/auth_ldap.py @@ -332,14 +332,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=LdapAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=LdapAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_pam.py b/rhodecode/authentication/plugins/auth_pam.py --- a/rhodecode/authentication/plugins/auth_pam.py +++ b/rhodecode/authentication/plugins/auth_pam.py @@ -82,14 +82,14 @@ class RhodeCodeAuthPlugin(RhodeCodeExter config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=PamAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=PamAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_rhodecode.py b/rhodecode/authentication/plugins/auth_rhodecode.py --- a/rhodecode/authentication/plugins/auth_rhodecode.py +++ b/rhodecode/authentication/plugins/auth_rhodecode.py @@ -52,14 +52,14 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=RhodecodeAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=RhodecodeAuthnResource) diff --git a/rhodecode/authentication/plugins/auth_token.py b/rhodecode/authentication/plugins/auth_token.py --- a/rhodecode/authentication/plugins/auth_token.py +++ b/rhodecode/authentication/plugins/auth_token.py @@ -55,14 +55,14 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthP config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_get', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='GET', route_name='auth_home', context=RhodecodeAuthnResource) config.add_view( 'rhodecode.authentication.views.AuthnPluginViewBase', attr='settings_post', - renderer='rhodecode:templates/admin/auth/plugin_settings.html', + renderer='rhodecode:templates/admin/auth/plugin_settings.mako', request_method='POST', route_name='auth_home', context=RhodecodeAuthnResource) diff --git a/rhodecode/authentication/views.py b/rhodecode/authentication/views.py --- a/rhodecode/authentication/views.py +++ b/rhodecode/authentication/views.py @@ -134,7 +134,7 @@ class AuthSettingsView(object): 'available_plugins': authn_registry.get_plugins(), 'enabled_plugins': enabled_plugins, } - html = render('rhodecode:templates/admin/auth/auth_settings.html', + html = render('rhodecode:templates/admin/auth/auth_settings.mako', template_context, request=self.request) diff --git a/rhodecode/channelstream/__init__.py b/rhodecode/channelstream/__init__.py --- a/rhodecode/channelstream/__init__.py +++ b/rhodecode/channelstream/__init__.py @@ -46,7 +46,7 @@ PLUGIN_DEFINITION = { 'javascript': [], 'css': [], 'template_hooks': { - 'plugin_init_template': 'rhodecode:templates/channelstream/plugin_init.html' + 'plugin_init_template': 'rhodecode:templates/channelstream/plugin_init.mako' }, 'url_gen': url_gen, 'static': None, diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -251,7 +251,7 @@ def error_handler(exception, request): c.causes = base_response.causes response = render_to_response( - '/errors/error_document.html', {'c': c}, request=request, + '/errors/error_document.mako', {'c': c}, request=request, response=base_response) return response diff --git a/rhodecode/controllers/admin/admin.py b/rhodecode/controllers/admin/admin.py --- a/rhodecode/controllers/admin/admin.py +++ b/rhodecode/controllers/admin/admin.py @@ -153,11 +153,11 @@ class AdminController(BaseController): c.users_log = Page(users_log, page=p, items_per_page=10, url=url_generator) - c.log_data = render('admin/admin_log.html') + c.log_data = render('admin/admin_log.mako') if request.is_xhr: return c.log_data - return render('admin/admin.html') + return render('admin/admin.mako') # global redirect doesn't need permissions def pull_requests(self, pull_request_id): diff --git a/rhodecode/controllers/admin/defaults.py b/rhodecode/controllers/admin/defaults.py --- a/rhodecode/controllers/admin/defaults.py +++ b/rhodecode/controllers/admin/defaults.py @@ -57,7 +57,7 @@ class DefaultsController(BaseController) defaults = SettingsModel().get_default_repo_settings() return htmlfill.render( - render('admin/defaults/defaults.html'), + render('admin/defaults/defaults.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -88,7 +88,7 @@ class DefaultsController(BaseController) defaults = errors.value return htmlfill.render( - render('admin/defaults/defaults.html'), + render('admin/defaults/defaults.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, diff --git a/rhodecode/controllers/admin/gists.py b/rhodecode/controllers/admin/gists.py --- a/rhodecode/controllers/admin/gists.py +++ b/rhodecode/controllers/admin/gists.py @@ -114,7 +114,7 @@ class GistsController(BaseController): c.active = 'public' from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') data = [] @@ -130,7 +130,7 @@ class GistsController(BaseController): 'description': _render('gist_description', gist.gist_description) }) c.data = json.dumps(data) - return render('admin/gists/index.html') + return render('admin/gists/index.mako') @LoginRequired() @NotAnonymous() @@ -186,7 +186,7 @@ class GistsController(BaseController): del errors['nodes.0.filename'] return formencode.htmlfill.render( - render('admin/gists/new.html'), + render('admin/gists/new.mako'), defaults=defaults, errors=errors, prefix_error=False, @@ -206,7 +206,7 @@ class GistsController(BaseController): """GET /admin/gists/new: Form to create a new item""" # url('new_gist') self.__load_defaults() - return render('admin/gists/new.html') + return render('admin/gists/new.mako') @LoginRequired() @NotAnonymous() @@ -266,7 +266,7 @@ class GistsController(BaseController): if (f_path is None or f.path == f_path)]) response.content_type = 'text/plain' return content - return render('admin/gists/show.html') + return render('admin/gists/show.mako') @LoginRequired() @NotAnonymous() @@ -344,7 +344,7 @@ class GistsController(BaseController): expiry = h.age(h.time_to_datetime(c.gist.gist_expires)) self.__load_defaults( extra_values=(0, _('%(expiry)s - current value') % {'expiry': expiry})) - return render('admin/gists/edit.html') + return render('admin/gists/edit.mako') @LoginRequired() @NotAnonymous() diff --git a/rhodecode/controllers/admin/my_account.py b/rhodecode/controllers/admin/my_account.py --- a/rhodecode/controllers/admin/my_account.py +++ b/rhodecode/controllers/admin/my_account.py @@ -144,7 +144,7 @@ class MyAccountController(BaseController except formencode.Invalid as errors: return htmlfill.render( - render('admin/my_account/my_account.html'), + render('admin/my_account/my_account.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -159,7 +159,7 @@ class MyAccountController(BaseController return redirect('my_account') return htmlfill.render( - render('admin/my_account/my_account.html'), + render('admin/my_account/my_account.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -175,7 +175,7 @@ class MyAccountController(BaseController defaults = c.user.get_dict() return htmlfill.render( - render('admin/my_account/my_account.html'), + render('admin/my_account/my_account.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) def my_account_edit(self): @@ -190,7 +190,7 @@ class MyAccountController(BaseController defaults = c.user.get_dict() return htmlfill.render( - render('admin/my_account/my_account.html'), + render('admin/my_account/my_account.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -235,7 +235,7 @@ class MyAccountController(BaseController return redirect(url('my_account_password')) c.form = form - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') def my_account_repos(self): c.active = 'repos' @@ -243,7 +243,7 @@ class MyAccountController(BaseController # json used to render the grid c.data = self._load_my_repos_data() - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') def my_account_watched(self): c.active = 'watched' @@ -251,14 +251,14 @@ class MyAccountController(BaseController # json used to render the grid c.data = self._load_my_repos_data(watched=True) - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') def my_account_perms(self): c.active = 'perms' self.__load_data() c.perm_user = c.auth_user - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') def my_account_emails(self): c.active = 'emails' @@ -266,7 +266,7 @@ class MyAccountController(BaseController c.user_email_map = UserEmailMap.query()\ .filter(UserEmailMap.user == c.user).all() - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') @auth.CSRFRequired() def my_account_emails_add(self): @@ -318,7 +318,7 @@ class MyAccountController(BaseController user_id=c.rhodecode_user.user_id, statuses=statuses) from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') data = [] for pr in pull_requests: repo_id = pr.target_repo_id @@ -372,7 +372,7 @@ class MyAccountController(BaseController if not request.is_xhr: c.data_participate = json.dumps(data['data']) c.records_total_participate = data['recordsTotal'] - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') else: return json.dumps(data) @@ -393,7 +393,7 @@ class MyAccountController(BaseController c.role_options = [(c.role_values, _("Role"))] c.user_auth_tokens = AuthTokenModel().get_auth_tokens( c.rhodecode_user.user_id, show_expired=show_expired) - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') @auth.CSRFRequired() def my_account_auth_tokens_add(self): @@ -426,7 +426,7 @@ class MyAccountController(BaseController def my_notifications(self): c.active = 'notifications' - return render('admin/my_account/my_account.html') + return render('admin/my_account/my_account.mako') @auth.CSRFRequired() @jsonify diff --git a/rhodecode/controllers/admin/notifications.py b/rhodecode/controllers/admin/notifications.py --- a/rhodecode/controllers/admin/notifications.py +++ b/rhodecode/controllers/admin/notifications.py @@ -82,9 +82,9 @@ class NotificationsController(BaseContro c.current_filter = 'comment' if request.is_xhr: - return render('admin/notifications/notifications_data.html') + return render('admin/notifications/notifications_data.mako') - return render('admin/notifications/notifications.html') + return render('admin/notifications/notifications.mako') @auth.CSRFRequired() @@ -102,7 +102,7 @@ class NotificationsController(BaseContro url('notifications'), request.GET) c.notifications = Page(notif, page=1, items_per_page=10, url=notifications_url) - return render('admin/notifications/notifications_data.html') + return render('admin/notifications/notifications_data.mako') def _has_permissions(self, notification): def is_owner(): @@ -173,6 +173,6 @@ class NotificationsController(BaseContro Session().commit() c.notification = no - return render('admin/notifications/show_notification.html') + return render('admin/notifications/show_notification.mako') return abort(403) diff --git a/rhodecode/controllers/admin/permissions.py b/rhodecode/controllers/admin/permissions.py --- a/rhodecode/controllers/admin/permissions.py +++ b/rhodecode/controllers/admin/permissions.py @@ -80,7 +80,7 @@ class PermissionsController(BaseControll defaults.update(c.user.get_default_perms()) return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -116,7 +116,7 @@ class PermissionsController(BaseControll defaults = errors.value return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -137,7 +137,7 @@ class PermissionsController(BaseControll defaults = {} defaults.update(c.user.get_default_perms()) return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -165,7 +165,7 @@ class PermissionsController(BaseControll defaults = errors.value return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -188,7 +188,7 @@ class PermissionsController(BaseControll defaults.update(c.user.get_default_perms()) return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -219,7 +219,7 @@ class PermissionsController(BaseControll defaults = errors.value return htmlfill.render( - render('admin/permissions/permissions.html'), + render('admin/permissions/permissions.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -239,11 +239,11 @@ class PermissionsController(BaseControll c.user_ip_map = ( UserIpMap.query().filter(UserIpMap.user == c.user).all()) - return render('admin/permissions/permissions.html') + return render('admin/permissions/permissions.mako') @HasPermissionAllDecorator('hg.admin') def permission_perms(self): c.active = 'perms' c.user = User.get_default_user() c.perm_user = c.user.AuthUser - return render('admin/permissions/permissions.html') + return render('admin/permissions/permissions.mako') diff --git a/rhodecode/controllers/admin/repo_groups.py b/rhodecode/controllers/admin/repo_groups.py --- a/rhodecode/controllers/admin/repo_groups.py +++ b/rhodecode/controllers/admin/repo_groups.py @@ -162,7 +162,7 @@ class RepoGroupsController(BaseControlle repo_group_data = RepoGroupModel().get_repo_groups_as_dict( repo_group_list=repo_group_list_acl, admin=True) c.data = json.dumps(repo_group_data) - return render('admin/repo_groups/repo_groups.html') + return render('admin/repo_groups/repo_groups.mako') # perm checks inside @NotAnonymous() @@ -199,7 +199,7 @@ class RepoGroupsController(BaseControlle # TODO: in futureaction_logger(, '', '', '', self.sa) except formencode.Invalid as errors: return htmlfill.render( - render('admin/repo_groups/repo_group_add.html'), + render('admin/repo_groups/repo_group_add.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -224,7 +224,7 @@ class RepoGroupsController(BaseControlle return abort(403) self.__load_defaults() - return render('admin/repo_groups/repo_group_add.html') + return render('admin/repo_groups/repo_group_add.mako') @HasRepoGroupPermissionAnyDecorator('group.admin') @auth.CSRFRequired() @@ -263,7 +263,7 @@ class RepoGroupsController(BaseControlle except formencode.Invalid as errors: c.active = 'settings' return htmlfill.render( - render('admin/repo_groups/repo_group_edit.html'), + render('admin/repo_groups/repo_group_edit.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -338,7 +338,7 @@ class RepoGroupsController(BaseControlle defaults = self.__load_data(c.repo_group.group_id) return htmlfill.render( - render('admin/repo_groups/repo_group_edit.html'), + render('admin/repo_groups/repo_group_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -351,7 +351,7 @@ class RepoGroupsController(BaseControlle c.active = 'advanced' c.repo_group = RepoGroupModel()._get_repo_group(group_name) - return render('admin/repo_groups/repo_group_edit.html') + return render('admin/repo_groups/repo_group_edit.mako') @HasRepoGroupPermissionAnyDecorator('group.admin') def edit_repo_group_perms(self, group_name): @@ -363,7 +363,7 @@ class RepoGroupsController(BaseControlle defaults = self.__load_data(c.repo_group.group_id) return htmlfill.render( - render('admin/repo_groups/repo_group_edit.html'), + render('admin/repo_groups/repo_group_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py --- a/rhodecode/controllers/admin/repos.py +++ b/rhodecode/controllers/admin/repos.py @@ -147,7 +147,7 @@ class ReposController(BaseRepoController # json used to render the grid c.data = json.dumps(repos_data) - return render('admin/repos/repos.html') + return render('admin/repos/repos.mako') # perms check inside @NotAnonymous() @@ -175,7 +175,7 @@ class ReposController(BaseRepoController task_id = task.task_id except formencode.Invalid as errors: return htmlfill.render( - render('admin/repos/repo_add.html'), + render('admin/repos/repo_add.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -235,7 +235,7 @@ class ReposController(BaseRepoController defaults.update({'repo_group': parent_group_choice}) return htmlfill.render( - render('admin/repos/repo_add.html'), + render('admin/repos/repo_add.mako'), defaults=defaults, errors={}, prefix_error=False, @@ -249,7 +249,7 @@ class ReposController(BaseRepoController c.task_id = request.GET.get('task_id') if not c.repo: raise HTTPNotFound() - return render('admin/repos/repo_creating.html') + return render('admin/repos/repo_creating.mako') @NotAnonymous() @jsonify @@ -334,7 +334,7 @@ class ReposController(BaseRepoController defaults = self.__load_data(repo_name) defaults.update(errors.value) return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -410,7 +410,7 @@ class ReposController(BaseRepoController c.personal_repo_group = c.rhodecode_user.personal_repo_group c.active = 'settings' return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -424,7 +424,7 @@ class ReposController(BaseRepoController defaults = RepoModel()._get_defaults(repo_name) return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -454,7 +454,7 @@ class ReposController(BaseRepoController if request.POST: return redirect(url('repo_edit_fields')) - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') @auth.CSRFRequired() @@ -509,7 +509,7 @@ class ReposController(BaseRepoController if request.POST: return redirect(url('repo_edit_advanced')) - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') @auth.CSRFRequired() @@ -642,7 +642,7 @@ class ReposController(BaseRepoController c.repo_info = self._load_repo(repo_name) c.active = 'caches' - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') @auth.CSRFRequired() @@ -664,7 +664,7 @@ class ReposController(BaseRepoController c.repo_info = self._load_repo(repo_name) c.active = 'remote' - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') @auth.CSRFRequired() @@ -702,7 +702,7 @@ class ReposController(BaseRepoController c.active = 'statistics' - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') @auth.CSRFRequired() @@ -771,7 +771,7 @@ class ReposController(BaseRepoController c.global_patterns = c.settings_model.get_global_settings() c.repo_patterns = c.settings_model.get_repo_settings() - return render('admin/repos/repo_edit.html') + return render('admin/repos/repo_edit.mako') @HasRepoPermissionAllDecorator('repository.admin') def repo_settings_vcs(self, repo_name): @@ -791,7 +791,7 @@ class ReposController(BaseRepoController rhodecode.CONFIG.get('labs_settings_active', 'true')) return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -819,7 +819,7 @@ class ReposController(BaseRepoController _("Some form inputs contain invalid data."), category='error') return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -842,7 +842,7 @@ class ReposController(BaseRepoController return redirect(url('repo_vcs_settings', repo_name=repo_name)) return htmlfill.render( - render('admin/repos/repo_edit.html'), + render('admin/repos/repo_edit.mako'), defaults=self._vcs_form_defaults(repo_name), encoding="UTF-8", force_defaults=False) diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py +++ b/rhodecode/controllers/admin/settings.py @@ -150,7 +150,7 @@ class SettingsController(BaseController) _("Some form inputs contain invalid data."), category='error') return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -179,7 +179,7 @@ class SettingsController(BaseController) return redirect(url('admin_settings_vcs')) return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -198,7 +198,7 @@ class SettingsController(BaseController) c.svn_proxy_generate_config = pyramid_settings[generate_config] return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -235,7 +235,7 @@ class SettingsController(BaseController) c.active = 'mapping' return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -253,7 +253,7 @@ class SettingsController(BaseController) form_result = application_form.to_python(dict(request.POST)) except formencode.Invalid as errors: return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -296,7 +296,7 @@ class SettingsController(BaseController) .get_personal_group_name_pattern() return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -312,7 +312,7 @@ class SettingsController(BaseController) form_result = application_form.to_python(dict(request.POST)) except formencode.Invalid as errors: return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -360,7 +360,7 @@ class SettingsController(BaseController) c.active = 'visual' return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -406,7 +406,7 @@ class SettingsController(BaseController) 'desc': defaults.get('rhodecode_issuetracker_desc_' + uid), }) - return render('admin/settings/settings.html') + return render('admin/settings/settings.mako') @HasPermissionAllDecorator('hg.admin') @auth.CSRFRequired() @@ -469,7 +469,7 @@ class SettingsController(BaseController) c.rhodecode_ini = rhodecode.CONFIG return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -526,7 +526,7 @@ class SettingsController(BaseController) c.custom_hooks = model.get_custom_hooks() return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding="UTF-8", force_defaults=False) @@ -541,7 +541,7 @@ class SettingsController(BaseController) searcher = searcher_from_config(config) c.statistics = searcher.statistics() - return render('admin/settings/settings.html') + return render('admin/settings/settings.mako') @HasPermissionAllDecorator('hg.admin') def settings_system(self): @@ -635,12 +635,12 @@ class SettingsController(BaseController) if snapshot: if c.allowed_to_snapshot: c.data_items.pop(0) # remove server info - return render('admin/settings/settings_system_snapshot.html') + return render('admin/settings/settings_system_snapshot.mako') else: h.flash('You are not allowed to do this', category='warning') return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -688,7 +688,7 @@ class SettingsController(BaseController) c.should_upgrade = True c.important_notices = latest['general'] - return render('admin/settings/settings_system_update.html') + return render('admin/settings/settings_system_update.mako') @HasPermissionAllDecorator('hg.admin') def settings_supervisor(self): @@ -710,7 +710,7 @@ class SettingsController(BaseController) except Exception as e: c.connection_error = str(e) log.exception("Exception reading supervisor data") - return render('admin/settings/settings.html') + return render('admin/settings/settings.mako') groupid = c.rhodecode_ini.get('supervisor.group_id') @@ -734,7 +734,7 @@ class SettingsController(BaseController) log.exception("Exception reading supervisor data") c.supervisor_procs[k] = {'_rhodecode_error': str(e)} - return render('admin/settings/settings.html') + return render('admin/settings/settings.mako') @HasPermissionAllDecorator('hg.admin') def settings_supervisor_log(self, procid): @@ -751,7 +751,7 @@ class SettingsController(BaseController) offset = abs(safe_int(request.GET.get('offset', c.log_size))) * -1 c.log = supervisor.read_process_log(_connection, procid, offset, 0) - return render('admin/settings/settings.html') + return render('admin/settings/settings.mako') @HasPermissionAllDecorator('hg.admin') @auth.CSRFRequired() @@ -768,7 +768,7 @@ class SettingsController(BaseController) _('Some form inputs contain invalid data.'), category='error') return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -795,7 +795,7 @@ class SettingsController(BaseController) return redirect(url('admin_settings_labs')) return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding='UTF-8', force_defaults=False) @@ -811,7 +811,7 @@ class SettingsController(BaseController) c.lab_settings = _LAB_SETTINGS return htmlfill.render( - render('admin/settings/settings.html'), + render('admin/settings/settings.mako'), defaults=self._form_defaults(), encoding='UTF-8', force_defaults=False) diff --git a/rhodecode/controllers/admin/user_groups.py b/rhodecode/controllers/admin/user_groups.py --- a/rhodecode/controllers/admin/user_groups.py +++ b/rhodecode/controllers/admin/user_groups.py @@ -109,7 +109,7 @@ class UserGroupsController(BaseControlle # url('users_groups') from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') def user_group_name(user_group_id, user_group_name): return _render("user_group_name", user_group_id, user_group_name) @@ -136,7 +136,7 @@ class UserGroupsController(BaseControlle }) c.data = json.dumps(user_groups_data) - return render('admin/user_groups/user_groups.html') + return render('admin/user_groups/user_groups.mako') @HasPermissionAnyDecorator('hg.admin', 'hg.usergroup.create.true') @auth.CSRFRequired() @@ -167,7 +167,7 @@ class UserGroupsController(BaseControlle Session().commit() except formencode.Invalid as errors: return htmlfill.render( - render('admin/user_groups/user_group_add.html'), + render('admin/user_groups/user_group_add.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -185,7 +185,7 @@ class UserGroupsController(BaseControlle def new(self): """GET /user_groups/new: Form to create a new item""" # url('new_users_group') - return render('admin/user_groups/user_group_add.html') + return render('admin/user_groups/user_group_add.mako') @HasUserGroupPermissionAnyDecorator('usergroup.admin') @auth.CSRFRequired() @@ -224,7 +224,7 @@ class UserGroupsController(BaseControlle e = errors.error_dict or {} return htmlfill.render( - render('admin/user_groups/user_group_edit.html'), + render('admin/user_groups/user_group_edit.mako'), defaults=defaults, errors=e, prefix_error=False, @@ -276,7 +276,7 @@ class UserGroupsController(BaseControlle defaults = self.__load_defaults(user_group_id) return htmlfill.render( - render('admin/user_groups/user_group_edit.html'), + render('admin/user_groups/user_group_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -299,7 +299,7 @@ class UserGroupsController(BaseControlle p.permission.permission_name}) return htmlfill.render( - render('admin/user_groups/user_group_edit.html'), + render('admin/user_groups/user_group_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -365,7 +365,7 @@ class UserGroupsController(BaseControlle permissions['repositories_groups'][gr.group.group_name] \ = gr.permission.permission_name c.permissions = permissions - return render('admin/user_groups/user_group_edit.html') + return render('admin/user_groups/user_group_edit.mako') @HasUserGroupPermissionAnyDecorator('usergroup.admin') def edit_global_perms(self, user_group_id): @@ -379,7 +379,7 @@ class UserGroupsController(BaseControlle defaults.update(c.user_group.get_default_perms()) return htmlfill.render( - render('admin/user_groups/user_group_edit.html'), + render('admin/user_groups/user_group_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -425,7 +425,7 @@ class UserGroupsController(BaseControlle defaults = errors.value c.user_group = user_group return htmlfill.render( - render('admin/user_groups/user_group_edit.html'), + render('admin/user_groups/user_group_edit.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -456,7 +456,7 @@ class UserGroupsController(BaseControlle (x.group for x in c.user_group.users_group_repo_group_to_perm), key=lambda u: u.group_name.lower()) - return render('admin/user_groups/user_group_edit.html') + return render('admin/user_groups/user_group_edit.mako') @HasUserGroupPermissionAnyDecorator('usergroup.admin') @XHRRequired() diff --git a/rhodecode/controllers/admin/users.py b/rhodecode/controllers/admin/users.py --- a/rhodecode/controllers/admin/users.py +++ b/rhodecode/controllers/admin/users.py @@ -82,7 +82,7 @@ class UsersController(BaseController): # url('users') from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') def username(user_id, username): return _render("user_name", user_id, username) @@ -119,7 +119,7 @@ class UsersController(BaseController): c.data = json.dumps(users_data) - return render('admin/users/users.html') + return render('admin/users/users.mako') def _get_personal_repo_group_template_vars(self): DummyUser = AttributeDict({ @@ -156,7 +156,7 @@ class UsersController(BaseController): except formencode.Invalid as errors: self._get_personal_repo_group_template_vars() return htmlfill.render( - render('admin/users/user_add.html'), + render('admin/users/user_add.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, @@ -176,7 +176,7 @@ class UsersController(BaseController): # url('new_user') c.default_extern_type = auth_rhodecode.RhodeCodeAuthPlugin.name self._get_personal_repo_group_template_vars() - return render('admin/users/user_add.html') + return render('admin/users/user_add.mako') @HasPermissionAllDecorator('hg.admin') @auth.CSRFRequired() @@ -218,7 +218,7 @@ class UsersController(BaseController): e = errors.error_dict or {} return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, errors=e, prefix_error=False, @@ -414,7 +414,7 @@ class UsersController(BaseController): defaults = c.user.get_dict() defaults.update({'language': c.user.user_data.get('language')}) return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -446,7 +446,7 @@ class UsersController(BaseController): '"inactive" instead of deleting it.') if has_review else '' return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -476,7 +476,7 @@ class UsersController(BaseController): c.user.user_id, show_expired=show_expired) defaults = c.user.get_dict() return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -539,7 +539,7 @@ class UsersController(BaseController): defaults.update(c.user.get_default_perms()) return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -584,7 +584,7 @@ class UsersController(BaseController): defaults = errors.value c.user = user return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, errors=errors.error_dict or {}, prefix_error=False, @@ -607,7 +607,7 @@ class UsersController(BaseController): c.active = 'perms_summary' c.perm_user = AuthUser(user_id=user_id, ip_addr=self.ip_addr) - return render('admin/users/user_edit.html') + return render('admin/users/user_edit.mako') @HasPermissionAllDecorator('hg.admin') def edit_emails(self, user_id): @@ -623,7 +623,7 @@ class UsersController(BaseController): defaults = c.user.get_dict() return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) @@ -685,7 +685,7 @@ class UsersController(BaseController): defaults = c.user.get_dict() return htmlfill.render( - render('admin/users/user_edit.html'), + render('admin/users/user_edit.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False) diff --git a/rhodecode/controllers/bookmarks.py b/rhodecode/controllers/bookmarks.py --- a/rhodecode/controllers/bookmarks.py +++ b/rhodecode/controllers/bookmarks.py @@ -34,8 +34,8 @@ log = logging.getLogger(__name__) class BookmarksController(BaseReferencesController): - partials_template = 'bookmarks/bookmarks_data.html' - template = 'bookmarks/bookmarks.html' + partials_template = 'bookmarks/bookmarks_data.mako' + template = 'bookmarks/bookmarks.mako' def __before__(self): super(BookmarksController, self).__before__() diff --git a/rhodecode/controllers/branches.py b/rhodecode/controllers/branches.py --- a/rhodecode/controllers/branches.py +++ b/rhodecode/controllers/branches.py @@ -34,8 +34,8 @@ log = logging.getLogger(__name__) class BranchesController(BaseReferencesController): - partials_template = 'branches/branches_data.html' - template = 'branches/branches.html' + partials_template = 'branches/branches_data.mako' + template = 'branches/branches.mako' def __before__(self): super(BranchesController, self).__before__() diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py --- a/rhodecode/controllers/changelog.py +++ b/rhodecode/controllers/changelog.py @@ -193,7 +193,7 @@ class ChangelogController(BaseRepoContro if (request.environ.get('HTTP_X_PARTIAL_XHR') or request.environ.get('HTTP_X_PJAX')): # loading from ajax, we don't want the first result, it's popped - return render('changelog/changelog_file_history.html') + return render('changelog/changelog_file_history.mako') if f_path: revs = [] @@ -201,7 +201,7 @@ class ChangelogController(BaseRepoContro revs = c.pagination self._graph(c.rhodecode_repo, revs) - return render('changelog/changelog.html') + return render('changelog/changelog.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', @@ -209,7 +209,7 @@ class ChangelogController(BaseRepoContro def changelog_details(self, commit_id): if request.environ.get('HTTP_X_PARTIAL_XHR'): c.commit = c.rhodecode_repo.get_commit(commit_id=commit_id) - return render('changelog/changelog_details.html') + return render('changelog/changelog_details.mako') raise HTTPNotFound() @LoginRequired() @@ -218,5 +218,5 @@ class ChangelogController(BaseRepoContro def changelog_summary(self, repo_name): if request.environ.get('HTTP_X_PJAX'): _load_changelog_summary() - return render('changelog/changelog_summary_data.html') + return render('changelog/changelog_summary_data.mako') raise HTTPNotFound() diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -288,17 +288,17 @@ class ChangesetController(BaseRepoContro elif method == 'patch': response.content_type = 'text/plain' c.diff = safe_unicode(diff) - return render('changeset/patch_changeset.html') + return render('changeset/patch_changeset.mako') elif method == 'raw': response.content_type = 'text/plain' return diff elif method == 'show': if len(c.commit_ranges) == 1: - return render('changeset/changeset.html') + return render('changeset/changeset.mako') else: c.ancestor = None c.target_repo = c.rhodecode_db_repo - return render('changeset/changeset_range.html') + return render('changeset/changeset_range.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', @@ -390,7 +390,7 @@ class ChangesetController(BaseRepoContro if comment: data.update(comment.get_dict()) data.update({'rendered_text': - render('changeset/changeset_comment_block.html')}) + render('changeset/changeset_comment_block.mako')}) return data diff --git a/rhodecode/controllers/compare.py b/rhodecode/controllers/compare.py --- a/rhodecode/controllers/compare.py +++ b/rhodecode/controllers/compare.py @@ -92,7 +92,7 @@ class CompareController(BaseRepoControll c.commit_statuses = ChangesetStatus.STATUSES c.preview_mode = False c.file_path = None - return render('compare/compare_diff.html') + return render('compare/compare_diff.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', @@ -217,7 +217,7 @@ class CompareController(BaseRepoControll if partial: # for PR ajax commits loader if not c.ancestor: return '' # cannot merge if there is no ancestor - return render('compare/compare_commits.html') + return render('compare/compare_commits.mako') if c.ancestor: # case we want a simple diff without incoming commits, @@ -279,4 +279,4 @@ class CompareController(BaseRepoControll c.source_commit = source_commit c.target_commit = target_commit - return render('compare/compare_diff.html') + return render('compare/compare_diff.mako') diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -144,7 +144,7 @@ class FilesController(BaseRepoController log.debug('Generating cached file tree for %s, %s, %s', repo_name, commit_id, f_path) c.full_load = full_load - return render('files/files_browser_tree.html') + return render('files/files_browser_tree.mako') cache_manager = self.__get_tree_cache_manager( repo_name, caches.FILE_TREE) @@ -255,9 +255,9 @@ class FilesController(BaseRepoController raise HTTPNotFound() if request.environ.get('HTTP_X_PJAX'): - return render('files/files_pjax.html') + return render('files/files_pjax.mako') - return render('files/files.html') + return render('files/files.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', @@ -305,7 +305,7 @@ class FilesController(BaseRepoController c.authors.append(( h.email(author), h.person(author, 'username_or_name_or_email'))) - return render('files/file_authors_box.html') + return render('files/file_authors_box.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', @@ -465,7 +465,7 @@ class FilesController(BaseRepoController 'Deleted file %s via RhodeCode Enterprise') % (f_path) c.f_path = f_path - return render('files/files_delete.html') + return render('files/files_delete.mako') @CSRFRequired() @LoginRequired() @@ -574,7 +574,7 @@ class FilesController(BaseRepoController 'Edited file %s via RhodeCode Enterprise') % (f_path) c.f_path = f_path - return render('files/files_edit.html') + return render('files/files_edit.mako') def _is_valid_head(self, commit_id, repo): # check if commit is a branch identifier- basically we cannot @@ -700,7 +700,7 @@ class FilesController(BaseRepoController c.default_message = (_('Added file via RhodeCode Enterprise')) c.f_path = f_path - return render('files/files_add.html') + return render('files/files_add.mako') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', diff --git a/rhodecode/controllers/followers.py b/rhodecode/controllers/followers.py --- a/rhodecode/controllers/followers.py +++ b/rhodecode/controllers/followers.py @@ -50,9 +50,9 @@ class FollowersController(BaseRepoContro .order_by(UserFollowing.follows_from) c.followers_pager = Page(d, page=p, items_per_page=20) - c.followers_data = render('/followers/followers_data.html') + c.followers_data = render('/followers/followers_data.mako') if request.environ.get('HTTP_X_PJAX'): return c.followers_data - return render('/followers/followers.html') + return render('/followers/followers.mako') diff --git a/rhodecode/controllers/forks.py b/rhodecode/controllers/forks.py --- a/rhodecode/controllers/forks.py +++ b/rhodecode/controllers/forks.py @@ -122,12 +122,12 @@ class ForksController(BaseRepoController d.append(r) c.forks_pager = Page(d, page=p, items_per_page=20) - c.forks_data = render('/forks/forks_data.html') + c.forks_data = render('/forks/forks_data.mako') if request.environ.get('HTTP_X_PJAX'): return c.forks_data - return render('/forks/forks.html') + return render('/forks/forks.mako') @LoginRequired() @NotAnonymous() @@ -144,7 +144,7 @@ class ForksController(BaseRepoController defaults = self.__load_data(repo_name) return htmlfill.render( - render('forks/fork.html'), + render('forks/fork.mako'), defaults=defaults, encoding="UTF-8", force_defaults=False @@ -177,7 +177,7 @@ class ForksController(BaseRepoController except formencode.Invalid as errors: c.new_repo = errors.value['repo_name'] return htmlfill.render( - render('forks/fork.html'), + render('forks/fork.mako'), defaults=errors.value, errors=errors.error_dict or {}, prefix_error=False, diff --git a/rhodecode/controllers/home.py b/rhodecode/controllers/home.py --- a/rhodecode/controllers/home.py +++ b/rhodecode/controllers/home.py @@ -97,7 +97,7 @@ class HomeController(BaseController): c.repos_data = json.dumps(repo_data) c.repo_groups_data = json.dumps(repo_group_data) - return render('/index.html') + return render('/index.mako') @LoginRequired() @HasRepoGroupPermissionAnyDecorator('group.read', 'group.write', @@ -112,7 +112,7 @@ class HomeController(BaseController): c.repos_data = json.dumps(repo_data) c.repo_groups_data = json.dumps(repo_group_data) - return render('index_repo_group.html') + return render('index_repo_group.mako') def _get_repo_list(self, name_contains=None, repo_type=None, limit=20): query = Repository.query()\ diff --git a/rhodecode/controllers/journal.py b/rhodecode/controllers/journal.py --- a/rhodecode/controllers/journal.py +++ b/rhodecode/controllers/journal.py @@ -205,11 +205,11 @@ class JournalController(BaseController): c.journal_pager = Page(journal, page=p, items_per_page=20, url=url_generator) c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager) - c.journal_data = render('journal/journal_data.html') + c.journal_data = render('journal/journal_data.mako') if request.is_xhr: return c.journal_data - return render('journal/journal.html') + return render('journal/journal.mako') @LoginRequired(auth_token_access=True) @NotAnonymous() @@ -276,10 +276,10 @@ class JournalController(BaseController): c.journal_day_aggreagate = self._get_daily_aggregate(c.journal_pager) - c.journal_data = render('journal/journal_data.html') + c.journal_data = render('journal/journal_data.mako') if request.is_xhr: return c.journal_data - return render('journal/public_journal.html') + return render('journal/public_journal.mako') @LoginRequired(auth_token_access=True) def public_journal_atom(self): diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -216,7 +216,7 @@ class PullrequestsController(BaseRepoCon if not request.is_xhr: c.data = json.dumps(data['data']) c.records_total = data['recordsTotal'] - return render('/pullrequests/pullrequests.html') + return render('/pullrequests/pullrequests.mako') else: return json.dumps(data) @@ -255,7 +255,7 @@ class PullrequestsController(BaseRepoCon opened_by=opened_by) from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') data = [] for pr in pull_requests: comments = ChangesetCommentsModel().get_all_comments( @@ -347,7 +347,7 @@ class PullrequestsController(BaseRepoCon } c.default_source_ref = selected_source_ref - return render('/pullrequests/pullrequest.html') + return render('/pullrequests/pullrequest.mako') @LoginRequired() @NotAnonymous() @@ -852,7 +852,7 @@ class PullrequestsController(BaseRepoCon # this is a hack to properly display links, when creating PR, the # compare view and others uses different notation, and - # compare_commits.html renders links based on the target_repo. + # compare_commits.mako renders links based on the target_repo. # We need to swap that here to generate it properly on the html side c.target_repo = c.source_repo @@ -882,7 +882,7 @@ class PullrequestsController(BaseRepoCon c.changes, c.file_changes = self._get_pr_version_changes( version, pull_request_latest) - return render('/pullrequests/pullrequest_show.html') + return render('/pullrequests/pullrequest_show.mako') @LoginRequired() @NotAnonymous() @@ -985,7 +985,7 @@ class PullrequestsController(BaseRepoCon c.co = comm data.update(comm.get_dict()) data.update({'rendered_text': - render('changeset/changeset_comment_block.html')}) + render('changeset/changeset_comment_block.mako')}) return data diff --git a/rhodecode/controllers/search.py b/rhodecode/controllers/search.py --- a/rhodecode/controllers/search.py +++ b/rhodecode/controllers/search.py @@ -108,4 +108,4 @@ class SearchController(BaseRepoControlle c.cur_query = search_query c.search_type = search_type # Return a rendered template - return render('/search/search.html') + return render('/search/search.mako') diff --git a/rhodecode/controllers/summary.py b/rhodecode/controllers/summary.py --- a/rhodecode/controllers/summary.py +++ b/rhodecode/controllers/summary.py @@ -165,7 +165,7 @@ class SummaryController(BaseRepoControll c.repo_name, c.rhodecode_user.user_id) if c.repository_requirements_missing: - return render('summary/missing_requirements.html') + return render('summary/missing_requirements.mako') c.readme_data, c.readme_file = \ self.__get_readme_data(c.rhodecode_db_repo) @@ -173,9 +173,9 @@ class SummaryController(BaseRepoControll _load_changelog_summary() if request.is_xhr: - return render('changelog/changelog_summary_data.html') + return render('changelog/changelog_summary_data.mako') - return render('summary/summary.html') + return render('summary/summary.mako') @LoginRequired() @XHRRequired() diff --git a/rhodecode/controllers/tags.py b/rhodecode/controllers/tags.py --- a/rhodecode/controllers/tags.py +++ b/rhodecode/controllers/tags.py @@ -31,8 +31,8 @@ log = logging.getLogger(__name__) class TagsController(BaseReferencesController): - partials_template = 'tags/tags_data.html' - template = 'tags/tags.html' + partials_template = 'tags/tags_data.mako' + template = 'tags/tags.mako' def _get_reference_items(self, repo): return repo.tags.items() diff --git a/rhodecode/controllers/users.py b/rhodecode/controllers/users.py --- a/rhodecode/controllers/users.py +++ b/rhodecode/controllers/users.py @@ -40,4 +40,4 @@ class UsersController(BaseController): raise HTTPNotFound() c.active = 'user_profile' - return render('users/user.html') + return render('users/user.mako') diff --git a/rhodecode/integrations/routes.py b/rhodecode/integrations/routes.py --- a/rhodecode/integrations/routes.py +++ b/rhodecode/integrations/routes.py @@ -36,7 +36,7 @@ def includeme(config): ADMIN_PREFIX + '/integrations/new') config.add_view('rhodecode.integrations.views.GlobalIntegrationsView', attr='new_integration', - renderer='rhodecode:templates/admin/integrations/new.html', + renderer='rhodecode:templates/admin/integrations/new.mako', request_method='GET', route_name='global_integrations_new') @@ -47,7 +47,7 @@ def includeme(config): for route_name in ['global_integrations_home', 'global_integrations_list']: config.add_view('rhodecode.integrations.views.GlobalIntegrationsView', attr='index', - renderer='rhodecode:templates/admin/integrations/list.html', + renderer='rhodecode:templates/admin/integrations/list.mako', request_method='GET', route_name=route_name) @@ -62,12 +62,12 @@ def includeme(config): for route_name in ['global_integrations_create', 'global_integrations_edit']: config.add_view('rhodecode.integrations.views.GlobalIntegrationsView', attr='settings_get', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='GET', route_name=route_name) config.add_view('rhodecode.integrations.views.GlobalIntegrationsView', attr='settings_post', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='POST', route_name=route_name) @@ -89,7 +89,7 @@ def includeme(config): for route_name in ['repo_group_integrations_home', 'repo_group_integrations_list']: config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView', attr='index', - renderer='rhodecode:templates/admin/integrations/list.html', + renderer='rhodecode:templates/admin/integrations/list.mako', request_method='GET', route_name=route_name) @@ -101,7 +101,7 @@ def includeme(config): custom_predicates=(valid_repo_group,)) config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView', attr='new_integration', - renderer='rhodecode:templates/admin/integrations/new.html', + renderer='rhodecode:templates/admin/integrations/new.mako', request_method='GET', route_name='repo_group_integrations_new') @@ -120,12 +120,12 @@ def includeme(config): for route_name in ['repo_group_integrations_edit', 'repo_group_integrations_create']: config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView', attr='settings_get', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='GET', route_name=route_name) config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView', attr='settings_post', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='POST', route_name=route_name) @@ -147,7 +147,7 @@ def includeme(config): config.add_view('rhodecode.integrations.views.RepoIntegrationsView', attr='index', request_method='GET', - renderer='rhodecode:templates/admin/integrations/list.html', + renderer='rhodecode:templates/admin/integrations/list.mako', route_name=route_name) config.add_route('repo_integrations_new', @@ -158,7 +158,7 @@ def includeme(config): custom_predicates=(valid_repo,)) config.add_view('rhodecode.integrations.views.RepoIntegrationsView', attr='new_integration', - renderer='rhodecode:templates/admin/integrations/new.html', + renderer='rhodecode:templates/admin/integrations/new.mako', request_method='GET', route_name='repo_integrations_new') @@ -177,12 +177,12 @@ def includeme(config): for route_name in ['repo_integrations_edit', 'repo_integrations_create']: config.add_view('rhodecode.integrations.views.RepoIntegrationsView', attr='settings_get', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='GET', route_name=route_name) config.add_view('rhodecode.integrations.views.RepoIntegrationsView', attr='settings_post', - renderer='rhodecode:templates/admin/integrations/form.html', + renderer='rhodecode:templates/admin/integrations/form.mako', request_method='POST', route_name=route_name) diff --git a/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_3_0_0.py @@ -2792,7 +2792,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_0.py @@ -2784,7 +2784,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_1.py @@ -2784,7 +2784,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py b/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py --- a/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_4_0_2.py @@ -2788,7 +2788,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py --- a/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_5_0_0.py @@ -2788,7 +2788,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -914,7 +914,7 @@ def person_by_id(id_, show_attr="usernam def gravatar_with_user(author, show_disabled=False): from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('base/base.html') + _render = PartialRenderer('base/base.mako') return _render('gravatar_with_user', author, show_disabled=show_disabled) diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -903,7 +903,7 @@ class PartialRenderer(object): Partial renderer used to render chunks of html used in datagrids use like:: - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') _render('quick_menu', args, kwargs) PartialRenderer.h, c, diff --git a/rhodecode/login/views.py b/rhodecode/login/views.py --- a/rhodecode/login/views.py +++ b/rhodecode/login/views.py @@ -127,7 +127,7 @@ class LoginView(object): @view_config( route_name='login', request_method='GET', - renderer='rhodecode:templates/login.html') + renderer='rhodecode:templates/login.mako') def login(self): came_from = get_came_from(self.request) user = self.request.user @@ -153,7 +153,7 @@ class LoginView(object): @view_config( route_name='login', request_method='POST', - renderer='rhodecode:templates/login.html') + renderer='rhodecode:templates/login.mako') def login_post(self): came_from = get_came_from(self.request) session = self.request.session @@ -198,7 +198,7 @@ class LoginView(object): 'hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate') @view_config( route_name='register', request_method='GET', - renderer='rhodecode:templates/register.html',) + renderer='rhodecode:templates/register.mako',) def register(self, defaults=None, errors=None): defaults = defaults or {} errors = errors or {} @@ -224,7 +224,7 @@ class LoginView(object): 'hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate') @view_config( route_name='register', request_method='POST', - renderer='rhodecode:templates/register.html') + renderer='rhodecode:templates/register.mako') def register_post(self): captcha = self._get_captcha_data() auto_active = 'hg.register.auto_activate' in User.get_default_user()\ @@ -275,7 +275,7 @@ class LoginView(object): @view_config( route_name='reset_password', request_method=('GET', 'POST'), - renderer='rhodecode:templates/password_reset.html') + renderer='rhodecode:templates/password_reset.mako') def password_reset(self): captcha = self._get_captcha_data() diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -2802,7 +2802,7 @@ class CacheKey(Base, BaseModel): """ get suffix that might have been used in _get_cache_key to generate self.cache_key. Only used for informational purposes - in repo_edit.html. + in repo_edit.mako. """ # prefix, repo_name, suffix return self._cache_key_partition()[2] diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -241,7 +241,7 @@ class RepoModel(BaseModel): super_user_actions=False): from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') c = _render.c def quick_menu(repo_name): diff --git a/rhodecode/model/repo_group.py b/rhodecode/model/repo_group.py --- a/rhodecode/model/repo_group.py +++ b/rhodecode/model/repo_group.py @@ -652,7 +652,7 @@ class RepoGroupModel(BaseModel): super_user_actions=False): from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('data_table/_dt_elements.html') + _render = PartialRenderer('data_table/_dt_elements.mako') c = _render.c h = _render.h diff --git a/rhodecode/templates/admin/admin.html b/rhodecode/templates/admin/admin.mako rename from rhodecode/templates/admin/admin.html rename to rhodecode/templates/admin/admin.mako --- a/rhodecode/templates/admin/admin.html +++ b/rhodecode/templates/admin/admin.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%inherit file="/base/base.html"/> +<%inherit file="/base/base.mako"/> <%def name="title()"> ${_('Admin journal')} diff --git a/rhodecode/templates/admin/admin_log.html b/rhodecode/templates/admin/admin_log.mako rename from rhodecode/templates/admin/admin_log.html rename to rhodecode/templates/admin/admin_log.mako --- a/rhodecode/templates/admin/admin_log.html +++ b/rhodecode/templates/admin/admin_log.mako @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="base" file="/base/base.html"/> +<%namespace name="base" file="/base/base.mako"/> %if c.users_log: