Skip to content

Commit 60581fc

Browse files
author
Mateusz Sikora
committed
fix issue with setting POST attribute in request
1 parent 77db2d8 commit 60581fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rest_auth/registration/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ def form_valid(self, form):
4949
app_settings.EMAIL_VERIFICATION,
5050
self.get_success_url())
5151

52+
def get_form_kwargs(self, *args, **kwargs):
53+
kwargs = super(RegisterView, self).get_form_kwargs(*args, **kwargs)
54+
kwargs['data'] = self.request.data
55+
return kwargs
56+
5257
def post(self, request, *args, **kwargs):
5358
self.initial = {}
54-
self.request.POST = self.request.data.copy()
5559
form_class = self.get_form_class()
5660
self.form = self.get_form(form_class)
5761
if self.form.is_valid():

0 commit comments

Comments
 (0)