Django reports an error no such table: main auth_user__old
An error is reported when adding an article in the admin background
Django 2.0, I checked it. The reason for the error is that Django version is low and SQLite3 database is compatible
Solution:
Upgrade Django to 2.1.0 five
pip install django==2.1. 5
Just enter the command directly, and version 2.0 will be uninstalled automatically.
Delete migrations folder
Delete SQLite database
Migrate the default app first
python manage.py migrate
Then migrate your own app myblos
python manage.py makemigrations myblogs
python manage.py migrate myblogs
Re create administrator account and password
Just go back in and add the article
Similar Posts:
- [Solved] django.db.utils.ProgrammingError: (1146, u”Table” xxx doesn’t exist”)
- [Solved] DjangoORM Run python manage.py makemigrations Error: no changes detected
- [Django] python manage.py syncdb Unknown command: ‘syncdb’
- [Solved] You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for…
- [Solved] Djiango Create Migrations Error: query = query.decode(errors=’replace’) AttributeError: ‘str’ object has no attribute ‘decode’
- [Solved] NodeNotFoundError(self.error_message, self.key, origin=self.origin) django.db.migrations.excep
- Django exception-ImportError: No module named django.core.management
- sqlite3.OperationalError: database is locked
- [Solved] Django cannot create an app after creating a project
- [Solved] django DRF This field may not be null, This field cannot be blank