##// END OF EJS Templates
controllers: consistently use formfill.render with force_defaults=False...
Mads Kiilerich -
r4941:c04c2734 default
parent child Browse files
Show More
@@ -104,8 +104,7 b' class AuthSettingsController(BaseControl'
104 errors=errors,
104 errors=errors,
105 prefix_error=prefix_error,
105 prefix_error=prefix_error,
106 encoding="UTF-8",
106 encoding="UTF-8",
107 force_defaults=True,
107 force_defaults=False)
108 )
109
108
110 def auth_settings(self):
109 def auth_settings(self):
111 """POST create and store auth settings"""
110 """POST create and store auth settings"""
@@ -105,7 +105,8 b' class DefaultsController(BaseController)'
105 defaults=defaults,
105 defaults=defaults,
106 errors=errors.error_dict or {},
106 errors=errors.error_dict or {},
107 prefix_error=False,
107 prefix_error=False,
108 encoding="UTF-8")
108 encoding="UTF-8",
109 force_defaults=False)
109 except Exception:
110 except Exception:
110 log.error(traceback.format_exc())
111 log.error(traceback.format_exc())
111 h.flash(_('Error occurred during update of defaults'),
112 h.flash(_('Error occurred during update of defaults'),
@@ -138,8 +138,8 b' class GistsController(BaseController):'
138 defaults=defaults,
138 defaults=defaults,
139 errors=errors.error_dict or {},
139 errors=errors.error_dict or {},
140 prefix_error=False,
140 prefix_error=False,
141 encoding="UTF-8"
141 encoding="UTF-8",
142 )
142 force_defaults=False)
143
143
144 except Exception, e:
144 except Exception, e:
145 log.error(traceback.format_exc())
145 log.error(traceback.format_exc())
@@ -136,7 +136,8 b' class MyAccountController(BaseController'
136 defaults=errors.value,
136 defaults=errors.value,
137 errors=errors.error_dict or {},
137 errors=errors.error_dict or {},
138 prefix_error=False,
138 prefix_error=False,
139 encoding="UTF-8")
139 encoding="UTF-8",
140 force_defaults=False)
140 except Exception:
141 except Exception:
141 log.error(traceback.format_exc())
142 log.error(traceback.format_exc())
142 h.flash(_('Error occurred during update of user %s') \
143 h.flash(_('Error occurred during update of user %s') \
@@ -147,8 +148,7 b' class MyAccountController(BaseController'
147 render('admin/my_account/my_account.html'),
148 render('admin/my_account/my_account.html'),
148 defaults=defaults,
149 defaults=defaults,
149 encoding="UTF-8",
150 encoding="UTF-8",
150 force_defaults=False
151 force_defaults=False)
151 )
152
152
153 def my_account_password(self):
153 def my_account_password(self):
154 c.active = 'password'
154 c.active = 'password'
@@ -166,7 +166,8 b' class MyAccountController(BaseController'
166 defaults=errors.value,
166 defaults=errors.value,
167 errors=errors.error_dict or {},
167 errors=errors.error_dict or {},
168 prefix_error=False,
168 prefix_error=False,
169 encoding="UTF-8")
169 encoding="UTF-8",
170 force_defaults=False)
170 except Exception:
171 except Exception:
171 log.error(traceback.format_exc())
172 log.error(traceback.format_exc())
172 h.flash(_('Error occurred during update of user password'),
173 h.flash(_('Error occurred during update of user password'),
@@ -133,7 +133,8 b' class PermissionsController(BaseControll'
133 defaults=defaults,
133 defaults=defaults,
134 errors=errors.error_dict or {},
134 errors=errors.error_dict or {},
135 prefix_error=False,
135 prefix_error=False,
136 encoding="UTF-8")
136 encoding="UTF-8",
137 force_defaults=False)
137 except Exception:
138 except Exception:
138 log.error(traceback.format_exc())
139 log.error(traceback.format_exc())
139 h.flash(_('Error occurred during update of permissions'),
140 h.flash(_('Error occurred during update of permissions'),
@@ -190,7 +190,8 b' class RepoGroupsController(BaseControlle'
190 defaults=errors.value,
190 defaults=errors.value,
191 errors=errors.error_dict or {},
191 errors=errors.error_dict or {},
192 prefix_error=False,
192 prefix_error=False,
193 encoding="UTF-8")
193 encoding="UTF-8",
194 force_defaults=False)
194 except Exception:
195 except Exception:
195 log.error(traceback.format_exc())
196 log.error(traceback.format_exc())
196 h.flash(_('Error occurred during creation of repository group %s') \
197 h.flash(_('Error occurred during creation of repository group %s') \
@@ -263,7 +264,8 b' class RepoGroupsController(BaseControlle'
263 defaults=errors.value,
264 defaults=errors.value,
264 errors=errors.error_dict or {},
265 errors=errors.error_dict or {},
265 prefix_error=False,
266 prefix_error=False,
266 encoding="UTF-8")
267 encoding="UTF-8",
268 force_defaults=False)
267 except Exception:
269 except Exception:
268 log.error(traceback.format_exc())
270 log.error(traceback.format_exc())
269 h.flash(_('Error occurred during update of repository group %s') \
271 h.flash(_('Error occurred during update of repository group %s') \
@@ -155,6 +155,7 b' class ReposController(BaseRepoController'
155 defaults=errors.value,
155 defaults=errors.value,
156 errors=errors.error_dict or {},
156 errors=errors.error_dict or {},
157 prefix_error=False,
157 prefix_error=False,
158 force_defaults=False,
158 encoding="UTF-8")
159 encoding="UTF-8")
159
160
160 except Exception:
161 except Exception:
@@ -203,8 +204,8 b' class ReposController(BaseRepoController'
203 defaults=defaults,
204 defaults=defaults,
204 errors={},
205 errors={},
205 prefix_error=False,
206 prefix_error=False,
206 encoding="UTF-8"
207 encoding="UTF-8",
207 )
208 force_defaults=False)
208
209
209 @LoginRequired()
210 @LoginRequired()
210 @NotAnonymous()
211 @NotAnonymous()
@@ -300,7 +301,8 b' class ReposController(BaseRepoController'
300 defaults=defaults,
301 defaults=defaults,
301 errors=errors.error_dict or {},
302 errors=errors.error_dict or {},
302 prefix_error=False,
303 prefix_error=False,
303 encoding="UTF-8")
304 encoding="UTF-8",
305 force_defaults=False)
304
306
305 except Exception:
307 except Exception:
306 log.error(traceback.format_exc())
308 log.error(traceback.format_exc())
@@ -100,8 +100,8 b' class SettingsController(BaseController)'
100 defaults=errors.value,
100 defaults=errors.value,
101 errors=errors.error_dict or {},
101 errors=errors.error_dict or {},
102 prefix_error=False,
102 prefix_error=False,
103 encoding="UTF-8"
103 encoding="UTF-8",
104 )
104 force_defaults=False)
105
105
106 try:
106 try:
107 sett = Ui.get_by_key('push_ssl')
107 sett = Ui.get_by_key('push_ssl')
@@ -241,7 +241,8 b' class SettingsController(BaseController)'
241 defaults=errors.value,
241 defaults=errors.value,
242 errors=errors.error_dict or {},
242 errors=errors.error_dict or {},
243 prefix_error=False,
243 prefix_error=False,
244 encoding="UTF-8")
244 encoding="UTF-8",
245 force_defaults=False)
245
246
246 try:
247 try:
247 sett1 = Setting.create_or_update('title',
248 sett1 = Setting.create_or_update('title',
@@ -300,8 +301,8 b' class SettingsController(BaseController)'
300 defaults=errors.value,
301 defaults=errors.value,
301 errors=errors.error_dict or {},
302 errors=errors.error_dict or {},
302 prefix_error=False,
303 prefix_error=False,
303 encoding="UTF-8"
304 encoding="UTF-8",
304 )
305 force_defaults=False)
305
306
306 try:
307 try:
307 settings = [
308 settings = [
@@ -156,7 +156,8 b' class UserGroupsController(BaseControlle'
156 defaults=errors.value,
156 defaults=errors.value,
157 errors=errors.error_dict or {},
157 errors=errors.error_dict or {},
158 prefix_error=False,
158 prefix_error=False,
159 encoding="UTF-8")
159 encoding="UTF-8",
160 force_defaults=False)
160 except Exception:
161 except Exception:
161 log.error(traceback.format_exc())
162 log.error(traceback.format_exc())
162 h.flash(_('Error occurred during creation of user group %s') \
163 h.flash(_('Error occurred during creation of user group %s') \
@@ -216,7 +217,8 b' class UserGroupsController(BaseControlle'
216 defaults=defaults,
217 defaults=defaults,
217 errors=e,
218 errors=e,
218 prefix_error=False,
219 prefix_error=False,
219 encoding="UTF-8")
220 encoding="UTF-8",
221 force_defaults=False)
220 except Exception:
222 except Exception:
221 log.error(traceback.format_exc())
223 log.error(traceback.format_exc())
222 h.flash(_('Error occurred during update of user group %s') \
224 h.flash(_('Error occurred during update of user group %s') \
@@ -138,7 +138,8 b' class UsersController(BaseController):'
138 defaults=errors.value,
138 defaults=errors.value,
139 errors=errors.error_dict or {},
139 errors=errors.error_dict or {},
140 prefix_error=False,
140 prefix_error=False,
141 encoding="UTF-8")
141 encoding="UTF-8",
142 force_defaults=False)
142 except UserCreationError, e:
143 except UserCreationError, e:
143 h.flash(e, 'error')
144 h.flash(e, 'error')
144 except Exception:
145 except Exception:
@@ -198,7 +199,8 b' class UsersController(BaseController):'
198 defaults=defaults,
199 defaults=defaults,
199 errors=e,
200 errors=e,
200 prefix_error=False,
201 prefix_error=False,
201 encoding="UTF-8")
202 encoding="UTF-8",
203 force_defaults=False)
202 except Exception:
204 except Exception:
203 log.error(traceback.format_exc())
205 log.error(traceback.format_exc())
204 h.flash(_('Error occurred during update of user %s') \
206 h.flash(_('Error occurred during update of user %s') \
@@ -145,8 +145,7 b' class ForksController(BaseRepoController'
145 render('forks/fork.html'),
145 render('forks/fork.html'),
146 defaults=defaults,
146 defaults=defaults,
147 encoding="UTF-8",
147 encoding="UTF-8",
148 force_defaults=False
148 force_defaults=False)
149 )
150
149
151 @LoginRequired()
150 @LoginRequired()
152 @NotAnonymous()
151 @NotAnonymous()
@@ -181,7 +180,8 b' class ForksController(BaseRepoController'
181 defaults=errors.value,
180 defaults=errors.value,
182 errors=errors.error_dict or {},
181 errors=errors.error_dict or {},
183 prefix_error=False,
182 prefix_error=False,
184 encoding="UTF-8")
183 encoding="UTF-8",
184 force_defaults=False)
185 except Exception:
185 except Exception:
186 log.error(traceback.format_exc())
186 log.error(traceback.format_exc())
187 h.flash(_('An error occurred during repository forking %s') %
187 h.flash(_('An error occurred during repository forking %s') %
@@ -134,7 +134,8 b' class LoginController(BaseController):'
134 defaults=errors.value,
134 defaults=errors.value,
135 errors=errors.error_dict or {},
135 errors=errors.error_dict or {},
136 prefix_error=False,
136 prefix_error=False,
137 encoding="UTF-8")
137 encoding="UTF-8",
138 force_defaults=False)
138 except UserCreationError, e:
139 except UserCreationError, e:
139 # container auth or other auth functions that create users on
140 # container auth or other auth functions that create users on
140 # the fly can throw this exception signaling that there's issue
141 # the fly can throw this exception signaling that there's issue
@@ -201,7 +202,8 b' class LoginController(BaseController):'
201 defaults=errors.value,
202 defaults=errors.value,
202 errors=errors.error_dict or {},
203 errors=errors.error_dict or {},
203 prefix_error=False,
204 prefix_error=False,
204 encoding="UTF-8")
205 encoding="UTF-8",
206 force_defaults=False)
205 except UserCreationError, e:
207 except UserCreationError, e:
206 # container auth or other auth functions that create users on
208 # container auth or other auth functions that create users on
207 # the fly can throw this exception signaling that there's issue
209 # the fly can throw this exception signaling that there's issue
@@ -244,7 +246,8 b' class LoginController(BaseController):'
244 defaults=errors.value,
246 defaults=errors.value,
245 errors=errors.error_dict or {},
247 errors=errors.error_dict or {},
246 prefix_error=False,
248 prefix_error=False,
247 encoding="UTF-8")
249 encoding="UTF-8",
250 force_defaults=False)
248
251
249 return render('/password_reset.html')
252 return render('/password_reset.html')
250
253
General Comments 0
You need to be logged in to leave comments. Login now