Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration Page is not working #26

Open
akshatmaheshwari1702 opened this issue Nov 19, 2022 · 2 comments
Open

Registration Page is not working #26

akshatmaheshwari1702 opened this issue Nov 19, 2022 · 2 comments

Comments

@akshatmaheshwari1702
Copy link

While registering it is showing error .

@ERJavier
Copy link

ERJavier commented Mar 3, 2023

I manage to create users after I change this:

if form.is_valid(): user = form.save(commit=False) user.username = user.username.lower() user.save() login(request, user) return redirect('home') else: messages.error(request, 'An error occurred during registration')

to this:
try: if form.is_valid(): user = form.save(commit=False) user.username = user.username.lower() user.save() login(request, user) return redirect('home') else: messages.error( request, 'An error occurred during registration') except Exception as e: messages.error(request, f'an error occurred: {e}')

Just so you know, you need the correct indentation.

@kartiknarayansahoo
Copy link

still not resolved, can anyone resolve this issue?
getting the following error An error occurred during registration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants