コード例 #1
0
ファイル: oauth_tags.py プロジェクト: lutianba2014/DjangoBlog
def load_oauth_applications(request):
    applications = get_oauth_apps()
    baseurl = reverse('oauth:oauthlogin')
    path = request.get_full_path()

    apps = list(map(lambda x: (x.ICON_NAME,
                               '{baseurl}?type={type}&next_url={next}'
                               .format(baseurl=baseurl, type=x.ICON_NAME, next=path)), applications))
    return {
        'apps': apps
    }
コード例 #2
0
def load_oauth_applications(request):
    applications = get_oauth_apps()
    baseurl = reverse('oauth:oauthlogin')
    path = request.get_full_path()

    apps = list(
        map(
            lambda x: (x.ICON_NAME, '{baseurl}?type={type}&next_url={next}'.
                       format(baseurl=baseurl, type=x.ICON_NAME, next=path)),
            applications))
    return {'apps': apps}
コード例 #3
0
def load_oauth_applications():
    applications = get_oauth_apps()
    apps = list(
        map(lambda x: (x.ICON_NAME, x.get_authorization_url()), applications))
    return {'apps': apps}