I get the following error when I want to create superuser
Previously I have completely deleted the bbdb and recreated it.
python manage.py createsuperuser
You have 9 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, reclamaciones, sessions, usuario.
Run 'python manage.py migrate' to apply them.
Nombre de usuario: albert
Traceback (most recent call last):
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
return Database.Cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: usuario_usuario
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\apenaranda\Desktop\Python_Intranet\manage.py", line 22, in <module>
main()
File "C:\Users\apenaranda\Desktop\Python_Intranet\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
utility.execute()
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\core\management\__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\core\management\base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 88, in execute
return super().execute(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\core\management\base.py", line 448, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 130, in handle
error_msg = self._validate_username(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 297, in _validate_username
self.UserModel._default_manager.db_manager(database).get_by_natural_key(
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\contrib\auth\base_user.py", line 46, in get_by_natural_key
return self.get(**{self.model.USERNAME_FIELD: username})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\query.py", line 646, in get
num = len(clone)
^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\query.py", line 376, in __len__
self._fetch_all()
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\query.py", line 1867, in _fetch_all
self._result_cache = list(self._iterable_class(self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\query.py", line 87, in __iter__
results = compiler.execute_sql(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\models\sql\compiler.py", line 1398, in execute_sql
cursor.execute(sql, params)
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 103, in execute
return super().execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\apenaranda\Desktop\Python_Intranet\env\Lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
return Database.Cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: no such table: usuario_usuario
The table does exist in the database
Thank you