Problem description
E:\SweetYaya\MyProj03>python manage.py migrate
Operations to perform:
Apply all migrations: MyApp, admin, auth, contenttypes, sessions
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "D:\Program Files\Python36\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
utility.execute()
File "D:\Program Files\Python36\lib\site-packages\django\core\management\__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "D:\Program Files\Python36\lib\site-packages\django\core\management\base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "D:\Program Files\Python36\lib\site-packages\django\core\management\base.py", line 398, in execute
output = self.handle(*args, **options)
File "D:\Program Files\Python36\lib\site-packages\django\core\management\base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "D:\Program Files\Python36\lib\site-packages\django\core\management\commands\migrate.py", line 202, in handle
pre_migrate_apps = pre_migrate_state.apps
File "D:\Program Files\Python36\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:\Program Files\Python36\lib\site-packages\django\db\migrations\state.py", line 208, in apps
return StateApps(self.real_apps, self.models)
File "D:\Program Files\Python36\lib\site-packages\django\db\migrations\state.py", line 277, in __init__
raise ValueError("\n".join(error.msg for error in errors))
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'MyApp.sysuser', but app 'MyApp' doesn't provide model 'sysuser'.
Find your own python3. X and enter the site packages/Django/contrib/admin/migrations file directory__ init__. Py file, delete all others( Be careful not to__ init__. If you delete the PY file, don’t delete the migrations in the folder contrib/contenttypes. Otherwise, the function of migrate will be invalid and Django can only be removed.
Read More:
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- Migration admin.0001_initial is applied before its dependency xxx.0001_initial on database ‘default‘
- Nuxt uses the image lazy to load the lazy component tag, and an error is reported
- After the go pointer is declared and assigned, a panic: runtime error: invalid memory address or nil pointer reference appears
- Use xx [‘xx ‘] = XX to set field value or does not support field: XXX
- error: `cout’ was not declared in this scope
- django.db.utils.OperationalError: no such table: django_admin_log
- C ා programming encountered an object reference is required for the non-static field, method, or property error
- Arduino ide 1.6.9 problems encountered error:’TKD2′ was not declared in this scope
- error: ‘memcpy’ was not declared in this scope
- [Error] ‘sort’ was not declared in this scope
- error: ‘atoi’ was not declared in this scope
- error: ‘NULL’ was not declared in this scope
- error: ‘vector‘ was not declared in this scope|
- Error:‘itoa’ was not declared in this scope
- error: ‘exit’ was not declared in this scope
- g++ error: ‘printf’ was not declared in this scope
- c++ error: ‘malloc’ was not declared in this scope
- error: ‘CV_BGR2GRAY’ was not declared in this scope
- Code:: blocks prompt nullptr’s was not declared in this scope