Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def user_registration(request):
- from accounts.forms import UserRegistrationForm
- form = UserRegistrationForm(request.POST)
- if not form.is_valid():
- return {
- 'errors': form.errors.as_json(escape_html=False)
- }
- ### This can still return error, how to handle it? try catch?
- user = form.save()
- return {
- 'user': user.id,
- }
Add Comment
Please, Sign In to add comment