Hello,
I have been trying to login into my site, but I get this error:
OperationalError at /account/login/
no such table: account_userbase
/home/equant/.virtualenvs/mysite-virtualenv/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py, line 413, in execute
Weirdly enough, when I run my project in my own computer (localhost), I can login without worries at all. Also, when I uploaded my project to GitHub (before cloning to PythonAnywhere), my database had 2 users. Is that a problem? Whenever I try to login using their credentials, I get this error message. I also did the following steps to solve it:
1) ./manage.py makemigrations and then ./manage.py migrate (with my venv activated and in the BASE_DIR):
Result: "No migrations to apply."
2) Also tried to a create superuser (remember: I already had one though). It lets me enter my username, but, as soon as I enter it, I get:
Result: django.db.utils.OperationalError: no such table: account_userbase
What a nice result isn't it?
My guess was that something was wrong with the directories. Then, I changed settings.py's DATABASES to this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/home/equant/file1/file2/db.sqlite3',
}
}
In other words, I described the entire path. But nothing changes, even if I do 1 or 2. I also reloaded the web app.
Right now, I have no ideas what to do. As you all can see, I'm using sqlite database and did not set up any other databases, such as MySQL. What should I do?
Thanks