Changeset - 339d1368c10d
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-07-24 00:51:57
marcin@python-works.com
new style error display for settings, added flash msg for repo rescan
1 file changed with 4 insertions and 12 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/admin/settings.py
Show inline comments
 
@@ -2,7 +2,7 @@
 
# encoding: utf-8
 
# settings controller for pylons
 
# Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
 

	
 
#
 
# This program is free software; you can redistribute it and/or
 
# modify it under the terms of the GNU General Public License
 
# as published by the Free Software Foundation; version 2
 
@@ -94,6 +94,7 @@ class SettingsController(BaseController)
 
            initial = HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui)
 
            repo2db_mapper(initial, rm_obsolete)
 
            invalidate_cache('cached_repo_list')
 
            h.flash(_('Repositories sucessfully rescanned'), category='success')            
 
        
 
        if id == 'global':
 
            
 
@@ -123,24 +124,15 @@ class SettingsController(BaseController)
 
                    
 

	
 
            except formencode.Invalid as errors:
 
                c.form_errors = errors.error_dict
 
                return htmlfill.render(
 
                     render('admin/settings/settings.html'),
 
                    defaults=errors.value,
 
                     errors=errors.error_dict or {},
 
                     prefix_error=False,
 
                    encoding="UTF-8") 
 
                        
 
            
 
            
 
            
 
            
 

	
 
            
 
        return redirect(url('admin_settings'))
 

	
 

	
 

	
 

	
 

	
 
    def delete(self, id):
 
        """DELETE /admin/settings/id: Delete an existing item"""
 
        # Forms posted to this method should contain a hidden field:
0 comments (0 inline, 0 general)