mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-29 12:23:43 +03:00
fix issue with setting POST attribute in request
This commit is contained in:
parent
77db2d8d64
commit
60581fc375
|
@ -49,9 +49,13 @@ class RegisterView(APIView, SignupView):
|
||||||
app_settings.EMAIL_VERIFICATION,
|
app_settings.EMAIL_VERIFICATION,
|
||||||
self.get_success_url())
|
self.get_success_url())
|
||||||
|
|
||||||
|
def get_form_kwargs(self, *args, **kwargs):
|
||||||
|
kwargs = super(RegisterView, self).get_form_kwargs(*args, **kwargs)
|
||||||
|
kwargs['data'] = self.request.data
|
||||||
|
return kwargs
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
self.initial = {}
|
self.initial = {}
|
||||||
self.request.POST = self.request.data.copy()
|
|
||||||
form_class = self.get_form_class()
|
form_class = self.get_form_class()
|
||||||
self.form = self.get_form(form_class)
|
self.form = self.get_form(form_class)
|
||||||
if self.form.is_valid():
|
if self.form.is_valid():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user