mirror of https://gitlab.crans.org/bde/nk20
Add QRCode View, URL and test template
This commit is contained in:
parent
b8a93b0b75
commit
819b4214c9
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% comment %}
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
{% endcomment %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
Affichage du QR Code ici
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -24,4 +24,5 @@ urlpatterns = [
|
||||||
path('user/<int:pk>/update_pic/', views.ProfilePictureUpdateView.as_view(), name="user_update_pic"),
|
path('user/<int:pk>/update_pic/', views.ProfilePictureUpdateView.as_view(), name="user_update_pic"),
|
||||||
path('user/<int:pk>/aliases/', views.ProfileAliasView.as_view(), name="user_alias"),
|
path('user/<int:pk>/aliases/', views.ProfileAliasView.as_view(), name="user_alias"),
|
||||||
path('manage-auth-token/', views.ManageAuthTokens.as_view(), name='auth_token'),
|
path('manage-auth-token/', views.ManageAuthTokens.as_view(), name='auth_token'),
|
||||||
|
path('user/<int:pk>/qr_code/', views.QRCodeView.as_view(), name='qr_code'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -331,6 +331,13 @@ class ManageAuthTokens(LoginRequiredMixin, TemplateView):
|
||||||
context['token'] = Token.objects.get_or_create(user=self.request.user)[0]
|
context['token'] = Token.objects.get_or_create(user=self.request.user)[0]
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
class QRCodeView(LoginRequiredMixin, TemplateView):
|
||||||
|
"""
|
||||||
|
Affiche le QR Code
|
||||||
|
"""
|
||||||
|
model = QRCode
|
||||||
|
template_name = "member/qr_code.html"
|
||||||
|
extra_context = {"title": _("QR Code")}
|
||||||
|
|
||||||
# ******************************* #
|
# ******************************* #
|
||||||
# CLUB #
|
# CLUB #
|
||||||
|
|
Loading…
Reference in New Issue