From 56f1af7ea0c2d4254dbf478959b5bb78ba6ac260 Mon Sep 17 00:00:00 2001 From: p9xvr8cjz <2775939221@qq.com> Date: Fri, 7 Nov 2025 19:12:48 +0800 Subject: [PATCH] Delete 'oauth/templatetags/oauth_tags.py' --- oauth/templatetags/oauth_tags.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 oauth/templatetags/oauth_tags.py diff --git a/oauth/templatetags/oauth_tags.py b/oauth/templatetags/oauth_tags.py deleted file mode 100644 index 7b687d5..0000000 --- a/oauth/templatetags/oauth_tags.py +++ /dev/null @@ -1,22 +0,0 @@ -from django import template -from django.urls import reverse - -from oauth.oauthmanager import get_oauth_apps - -register = template.Library() - - -@register.inclusion_tag('oauth/oauth_applications.html') -def load_oauth_applications(request): - applications = get_oauth_apps() - if applications: - 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)) - else: - apps = [] - return { - 'apps': apps - }