Skip to content

Commit

Permalink
Merge pull request #663 from rfleschenberg/password-reset-upstream
Browse files Browse the repository at this point in the history
Bugfix: need to assign form name to template context
  • Loading branch information
jrief committed Oct 10, 2017
2 parents a0e9f50 + 021e97e commit be21e3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shop/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def get(self, request, uidb64=None, token=None):
serializer = serializer_class(data=data, context=self.get_serializer_context())
if not serializer.is_valid():
return Response({'validlink': False})
return Response({'validlink': True, 'user_name': force_text(serializer.user)})
return Response({
'validlink': True,
'user_name': force_text(serializer.user),
'form_name': 'password_reset_form',
})

def post(self, request, uidb64=None, token=None):
data = dict(request.data, uid=uidb64, token=token)
Expand Down

0 comments on commit be21e3f

Please sign in to comment.