mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Use DetailView
This commit is contained in:
		@@ -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               #
 | 
			
		||||
# ******************************* #
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user