1👍
create_user function takes the parameters as *args, so you need to call the function like that:
create_user(email = email, name = name, phone = phone, password = password)
or easily pass your request.POST:
create_user(request.POST)
I’m seeing that your view is a little bit complex, have you ever try Class Based Views?
With class based views you can create method do deal with get querysets and form rendering.
That a look https://docs.djangoproject.com/en/dev/topics/class-based-views/
At last advice, you can create a register_form to deal with data validation:
https://docs.djangoproject.com/en/dev/topics/forms/
0👍
You’re sending 6 arguments from your views.py where as you have only 4 required.
Note that password and confirm pass count as your 2 additional arguments. That’s what I think anyway
Take a look at THIS example. It helped me with creating my abstract user.
If you’d like some code examples, HERE is a good breakdown (if you’re on Django 1.5 that is)
- [Answer]-Dyld: Symbol not found: _iconv_open, a conflict between git and postgres
- [Answer]-Staticfiles loaded the wrong path – app_name/static/
- [Answer]-Confuse for using get queryset and using pass to ignore an exception and proceed in my django view