Having issues getting rid of this error.
I'm trying to use Digital Ocean to deploy my Django app. I configured Postgres, but when I'm trying to register a new user in my app, I get this problem.
I've tried running python manage.py makemigrations
and python manage.py migrate
and they work fine. The SQL migrations are completed upon migration.
Try add this to your imports:
from django.utils import timezone
Then wherever you grab the user
's data to save
the new user
add before the save
procedure:
<user_object>.last_login = timezone.now()
I was upgrading from django 1.7 to django 1.10 when I ran into this. What it ended up being was I needed to run python manage.py migrate
to update the database tables and columns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With