Break circular dependencies introduced by importing common in verbs
This commit is contained in:
parent
9d966c2605
commit
161475baaa
5 changed files with 57 additions and 51 deletions
|
@ -4,7 +4,8 @@ import requests
|
|||
from flask import request, redirect, url_for, Blueprint
|
||||
from flask.ext.login import current_user
|
||||
|
||||
from endpoints.common import render_page_template, common_login, route_show_if
|
||||
from endpoints.common import common_login, route_show_if
|
||||
from endpoints.web import render_page_template_with_routedata
|
||||
from app import app, analytics, get_app_url, github_login, google_login, dex_login
|
||||
from data import model
|
||||
from util.names import parse_repository_name
|
||||
|
@ -22,10 +23,12 @@ oauthlogin = Blueprint('oauthlogin', __name__)
|
|||
|
||||
def render_ologin_error(service_name,
|
||||
error_message='Could not load user data. The token may have expired.'):
|
||||
return render_page_template('ologinerror.html', service_name=service_name,
|
||||
error_message=error_message,
|
||||
service_url=get_app_url(),
|
||||
user_creation=features.USER_CREATION and features.DIRECT_LOGIN)
|
||||
user_creation = features.USER_CREATION and features.DIRECT_LOGIN
|
||||
return render_page_template_with_routedata('ologinerror.html',
|
||||
service_name=service_name,
|
||||
error_message=error_message,
|
||||
service_url=get_app_url(),
|
||||
user_creation=user_creation)
|
||||
|
||||
|
||||
def get_user(service, token):
|
||||
|
|
Reference in a new issue