I am running a test django server on aws and I just installed django-userena and when I try to signup a user upon clicking submit, I get the following message:
I recently ran into this issue (Django 1.8.7) even with SITE_ID = 1
in my settings. I had to manually migrate the sites
app before any other migrations:
./manage.py migrate sites
./manage.py migrate
I have the same problem and fixed it like this:
SITE_ID=1
into settings.py
run this command :
python manage.py migrate
if you are getting this error when deploying you django app to Heroku, make sure you have run:
heroku run python manage.py migrate
This worked for me
Going to leave this here for future me:
python manage.py makemigrations allauth
This worked for me, I forgot why, took me too long to figure out how I fixed this the first time
Edit: makemigrations sometimes doesnt make 3rd party things like allauth which some of my projects use, so I have to specify those ones
A horrible code lead to this error for me. I had a global variable to get the current site
SITE = Site.objects.get(pk=1)
this was evaluated during migration and lead to the error.
I got this error while working with django-cookiecutter
, django-allauth
and django-rest-auth
I literally spent 5 hours pulling my hair out. Eventually gave in and started to comment out bit by bit
What worked for me was commenting out both pre-configured url paths (they come with cookiecutter Django):
# User management
path("users/", include("yourapp.users.urls")),
path("accounts/", include("allauth.urls")),
After that migrations worked.
I uncommented it and my app has worked ever since. It was only for the initial migration
Hope it helps someone!