Parcourir la source

Remove unused function generate_password

This function had been removed in 7094048f to use a class-based view
instead, but it probably reappeared in a merge conflict.
Baptiste Jonglez il y a 10 ans
Parent
commit
7847b256ce
1 fichiers modifiés avec 0 ajouts et 15 suppressions
  1. 0 15
      coin/vpn/views.py

+ 0 - 15
coin/vpn/views.py

@@ -33,21 +33,6 @@ class VPNView(SuccessMessageMixin, UpdateView):
         return get_object_or_404(VPNConfiguration, pk=self.kwargs.get("id"),
         return get_object_or_404(VPNConfiguration, pk=self.kwargs.get("id"),
                                  offersubscription__member=self.request.user)
                                  offersubscription__member=self.request.user)
 
 
-def generate_password(request, id):
-    """This generates a random password, saves it in hashed form, and returns
-    it to the user in cleartext.
-    """
-    vpn = get_object_or_404(VPNConfiguration, pk=id,
-                            offersubscription__member=request.user)
-    # This function has nothing to here, but it's convenient.
-    password = Member.objects.make_random_password()
-    vpn.password = password
-    # This will hash the password automatically
-    vpn.full_clean()
-    vpn.save()
-    return render_to_response('vpn/fragments/password.html', {"vpn": vpn,
-                                                    "password": password})
-
 
 
 class VPNGeneratePasswordView(VPNView):
 class VPNGeneratePasswordView(VPNView):
     """This generates a random password, saves it in hashed form, and returns
     """This generates a random password, saves it in hashed form, and returns