Show More
@@ -2,7 +2,7 b'' | |||||
2 | # encoding: utf-8 |
|
2 | # encoding: utf-8 | |
3 | # settings controller for pylons |
|
3 | # settings controller for pylons | |
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
|
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> | |
5 |
|
5 | # | ||
6 | # This program is free software; you can redistribute it and/or |
|
6 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
7 | # modify it under the terms of the GNU General Public License | |
8 | # as published by the Free Software Foundation; version 2 |
|
8 | # as published by the Free Software Foundation; version 2 | |
@@ -94,6 +94,7 b' class SettingsController(BaseController)' | |||||
94 | initial = HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui) |
|
94 | initial = HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui) | |
95 | repo2db_mapper(initial, rm_obsolete) |
|
95 | repo2db_mapper(initial, rm_obsolete) | |
96 | invalidate_cache('cached_repo_list') |
|
96 | invalidate_cache('cached_repo_list') | |
|
97 | h.flash(_('Repositories sucessfully rescanned'), category='success') | |||
97 |
|
98 | |||
98 | if id == 'global': |
|
99 | if id == 'global': | |
99 |
|
100 | |||
@@ -123,24 +124,15 b' class SettingsController(BaseController)' | |||||
123 |
|
124 | |||
124 |
|
125 | |||
125 | except formencode.Invalid as errors: |
|
126 | except formencode.Invalid as errors: | |
126 | c.form_errors = errors.error_dict |
|
|||
127 | return htmlfill.render( |
|
127 | return htmlfill.render( | |
128 | render('admin/settings/settings.html'), |
|
128 | render('admin/settings/settings.html'), | |
129 | defaults=errors.value, |
|
129 | defaults=errors.value, | |
130 | encoding="UTF-8") |
|
130 | errors=errors.error_dict or {}, | |
|
131 | prefix_error=False, | |||
|
132 | encoding="UTF-8") | |||
131 |
|
133 | |||
132 |
|
||||
133 |
|
||||
134 |
|
||||
135 |
|
||||
136 |
|
||||
137 |
|
||||
138 | return redirect(url('admin_settings')) |
|
134 | return redirect(url('admin_settings')) | |
139 |
|
135 | |||
140 |
|
||||
141 |
|
||||
142 |
|
||||
143 |
|
||||
144 | def delete(self, id): |
|
136 | def delete(self, id): | |
145 | """DELETE /admin/settings/id: Delete an existing item""" |
|
137 | """DELETE /admin/settings/id: Delete an existing item""" | |
146 | # Forms posted to this method should contain a hidden field: |
|
138 | # Forms posted to this method should contain a hidden field: |
General Comments 0
You need to be logged in to leave comments.
Login now