mirror of https://gitlab.crans.org/bde/nk20
Use DetailView
This commit is contained in:
parent
5038af9e34
commit
8ffb0ebb56
|
@ -331,14 +331,20 @@ 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):
|
class QRCodeView(LoginRequiredMixin, DetailView):
|
||||||
"""
|
"""
|
||||||
Affiche le QR Code
|
Affiche le QR Code
|
||||||
"""
|
"""
|
||||||
model = QRCode
|
model = User
|
||||||
|
context_object_name = "user_object"
|
||||||
template_name = "member/qr_code.html"
|
template_name = "member/qr_code.html"
|
||||||
extra_context = {"title": _("QR Code")}
|
extra_context = {"title": _("QR Code")}
|
||||||
|
|
||||||
|
# def get_context_data(self, **kwargs):
|
||||||
|
# context = super().get_context_data(**kwargs)
|
||||||
|
# context["plop"] = "test"
|
||||||
|
# return context
|
||||||
|
|
||||||
# ******************************* #
|
# ******************************* #
|
||||||
# CLUB #
|
# CLUB #
|
||||||
# ******************************* #
|
# ******************************* #
|
||||||
|
|
Loading…
Reference in New Issue