Use DetailView

This commit is contained in:
otthorn 2022-03-22 14:59:01 +01:00 committed by root
parent 5038af9e34
commit 8ffb0ebb56
1 changed files with 8 additions and 2 deletions

View File

@ -331,14 +331,20 @@ class ManageAuthTokens(LoginRequiredMixin, TemplateView):
context['token'] = Token.objects.get_or_create(user=self.request.user)[0]
return context
class QRCodeView(LoginRequiredMixin, TemplateView):
class QRCodeView(LoginRequiredMixin, DetailView):
"""
Affiche le QR Code
"""
model = QRCode
model = User
context_object_name = "user_object"
template_name = "member/qr_code.html"
extra_context = {"title": _("QR Code")}
# def get_context_data(self, **kwargs):
# context = super().get_context_data(**kwargs)
# context["plop"] = "test"
# return context
# ******************************* #
# CLUB #
# ******************************* #