Fix all non-test url_for’s
This commit is contained in:
		
							parent
							
								
									d38c3e8efe
								
							
						
					
					
						commit
						4ffb86314b
					
				
					 3 changed files with 6 additions and 6 deletions
				
			
		|  | @ -1242,7 +1242,7 @@ def create_webhook(namespace, repository): | |||
|     webhook = model.create_webhook(repo, request.get_json()) | ||||
|     resp = jsonify(webhook_view(webhook)) | ||||
|     repo_string = '%s/%s' % (namespace, repository) | ||||
|     resp.headers['Location'] = url_for('get_webhook', repository=repo_string, | ||||
|     resp.headers['Location'] = url_for('api.get_webhook', repository=repo_string, | ||||
|                                        public_id=webhook.public_id) | ||||
|     log_action('add_repo_webhook', namespace,  | ||||
|                {'repo': repository, 'webhook_id': webhook.public_id}, | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ import logging | |||
| import os | ||||
| import base64 | ||||
| 
 | ||||
| from flask import request, abort, session | ||||
| from flask import request, abort, session, make_response | ||||
| from flask.ext.login import login_user, UserMixin | ||||
| from flask.ext.principal import identity_changed | ||||
| 
 | ||||
|  |  | |||
|  | @ -242,7 +242,7 @@ def github_oauth_callback(): | |||
|       return render_page_template('githuberror.html', error_message=ex.message) | ||||
| 
 | ||||
|   if common_login(to_login): | ||||
|     return redirect(url_for('index')) | ||||
|     return redirect(url_for('web.index')) | ||||
| 
 | ||||
|   return render_page_template('githuberror.html') | ||||
| 
 | ||||
|  | @ -255,7 +255,7 @@ def github_oauth_attach(): | |||
|   github_id = user_data['id'] | ||||
|   user_obj = current_user.db_user() | ||||
|   model.attach_federated_login(user_obj, 'github', github_id) | ||||
|   return redirect(url_for('user')) | ||||
|   return redirect(url_for('web.user')) | ||||
| 
 | ||||
| 
 | ||||
| @web.route('/confirm', methods=['GET']) | ||||
|  | @ -271,7 +271,7 @@ def confirm_email(): | |||
|      | ||||
|   common_login(user) | ||||
| 
 | ||||
|   return redirect(url_for('user', tab='email') if new_email else url_for('index')) | ||||
|   return redirect(url_for('web.user', tab='email') if new_email else url_for('web.index')) | ||||
| 
 | ||||
| 
 | ||||
| @web.route('/recovery', methods=['GET']) | ||||
|  | @ -281,6 +281,6 @@ def confirm_recovery(): | |||
| 
 | ||||
|   if user: | ||||
|     common_login(user) | ||||
|     return redirect(url_for('user')) | ||||
|     return redirect(url_for('web.user')) | ||||
|   else: | ||||
|     abort(403) | ||||
|  |  | |||
		Reference in a new issue