Comments (2)
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.
from studybud.
still not resolved, can anyone resolve this issue?
getting the following error An error occurred during registration
from studybud.
Related Issues (19)
- Login does not work HOT 2
- how to deploy over heroku getting error in procfile
- can not render the template HOT 1
- Delete icon not showing on messages
- Follow user Bug not appearing HOT 2
- Static file cant't not found
- Room name is not appearing HOT 2
- Can't login from login page HOT 1
- I did this project.But i get an error "'NoneType' object has no attribute 'lower'" on login function HOT 1
- LICENSE
- update-user.html page cancel button is not working and throwing 404
- Room name and description contradicting
- Change the Boiler Plate code for room.html HOT 1
- [Bug] Incorrect Link to Edit Page
- Participant issue in room messages
- Comment-form does not appear.
- ImportError: DLL load failed while importing _ssl: The specified module could not be found.
- Cannot create superuser from the command line! HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from studybud.