aboutsummaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2022-03-10 12:51:06 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2022-03-11 20:52:24 +0000
commit7f962b7e289f0908d1eddcc17411d459c4e853cb (patch)
treeeca16c6d23c02304202fd251e25453f76d07fb41 /urls.py
parent9e05dcd7cf021f9640c1d156f3626dd6516a3a48 (diff)
downloadlinaro-license-protection-master.tar.gz
LLP: fix templating problem for login pageHEADmaster
Since the login page is using the view created by django.contrib.auth, we need to ensure that the "site_name" context variable is set. Change-Id: I5e5160ffd54383718b9942d06871611cb038e818 Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org> Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/40739
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/urls.py b/urls.py
index e62fd0c..59f9340 100644
--- a/urls.py
+++ b/urls.py
@@ -71,8 +71,10 @@ urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^login/$',
- auth_views.login,
- {'template_name': 'login.html'},
+ auth_views.LoginView.as_view(
+ template_name='login.html',
+ extra_context={'site_name': settings.SITE_NAME},
+ ),
name='login'),
url(r'^logout/?$',