Задать вопрос
@akhundmurad

Почему при запуске collectstatic не видит модуль с настройками?

2021-03-18T08:24:00.6259952Z Traceback (most recent call last):
2021-03-18T08:24:00.6261551Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 224, in fetch_command
2021-03-18T08:24:00.6262699Z app_name = commands[subcommand]
2021-03-18T08:24:00.6263504Z KeyError: 'collectstatic'
2021-03-18T08:24:00.6263903Z
2021-03-18T08:24:00.6264579Z During handling of the above exception, another exception occurred:
2021-03-18T08:24:00.6265099Z
2021-03-18T08:24:00.6265617Z Traceback (most recent call last):
2021-03-18T08:24:00.6266250Z File "manage.py", line 22, in
2021-03-18T08:24:00.6266787Z main()
2021-03-18T08:24:00.6267374Z File "manage.py", line 18, in main
2021-03-18T08:24:00.6268023Z execute_from_command_line(sys.argv)
2021-03-18T08:24:00.6269212Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
2021-03-18T08:24:00.6270295Z utility.execute()
2021-03-18T08:24:00.6271482Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
2021-03-18T08:24:00.6272641Z self.fetch_command(subcommand).run_from_argv(self.argv)
2021-03-18T08:24:00.6274166Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 231, in fetch_command
2021-03-18T08:24:00.6275119Z settings.INSTALLED_APPS
2021-03-18T08:24:00.6276240Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
2021-03-18T08:24:00.6277072Z self._setup(name)
2021-03-18T08:24:00.6278084Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
2021-03-18T08:24:00.6279003Z self._wrapped = Settings(settings_module)
2021-03-18T08:24:00.6280122Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
2021-03-18T08:24:00.6281122Z mod = importlib.import_module(self.SETTINGS_MODULE)
2021-03-18T08:24:00.6282077Z File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-03-18T08:24:00.6282998Z return _bootstrap._gcd_import(name[level:], package, level)
2021-03-18T08:24:00.6283873Z File "", line 1014, in _gcd_import
2021-03-18T08:24:00.6284745Z File "", line 991, in _find_and_load
2021-03-18T08:24:00.6285637Z File "", line 973, in _find_and_load_unlocked
2021-03-18T08:24:00.6288527Z ModuleNotFoundError: No module named 'backend.settings *** *** *** *** *** *** *** ***'
2021-03-18T08:24:00.6289444Z Traceback (most recent call last):
2021-03-18T08:24:00.6290664Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 224, in fetch_command
2021-03-18T08:24:00.6291600Z app_name = commands[subcommand]
2021-03-18T08:24:00.6292422Z KeyError: 'collectstatic'
2021-03-18T08:24:00.6292841Z
2021-03-18T08:24:00.6293564Z During handling of the above exception, another exception occurred:
2021-03-18T08:24:00.6294132Z
2021-03-18T08:24:00.6294676Z Traceback (most recent call last):
2021-03-18T08:24:00.6295355Z File "manage.py", line 22, in
2021-03-18T08:24:00.6295932Z main()
2021-03-18T08:24:00.6296491Z File "manage.py", line 18, in main
2021-03-18T08:24:00.6297252Z execute_from_command_line(sys.argv)
2021-03-18T08:24:00.6298415Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
2021-03-18T08:24:00.6299321Z utility.execute()
2021-03-18T08:24:00.6300371Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
2021-03-18T08:24:00.6301607Z self.fetch_command(subcommand).run_from_argv(self.argv)
2021-03-18T08:24:00.6308705Z File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 231, in fetch_command
2021-03-18T08:24:00.6309549Z settings.INSTALLED_APPS
2021-03-18T08:24:00.6310472Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
2021-03-18T08:24:00.6311139Z self._setup(name)
2021-03-18T08:24:00.6311965Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
2021-03-18T08:24:00.6312742Z self._wrapped = Settings(settings_module)
2021-03-18T08:24:00.6313654Z File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
2021-03-18T08:24:00.6314458Z mod = importlib.import_module(self.SETTINGS_MODULE)
2021-03-18T08:24:00.6315229Z File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
2021-03-18T08:24:00.6316007Z return _bootstrap._gcd_import(name[level:], package, level)
2021-03-18T08:24:00.6316714Z File "", line 1014, in _gcd_import
2021-03-18T08:24:00.6317413Z File "", line 991, in _find_and_load
2021-03-18T08:24:00.6318141Z File "", line 973, in _find_and_load_unlocked
2021-03-18T08:24:00.6320343Z ModuleNotFoundError: No module named 'backend.settings *** *** *** *** *** *** *** ***'

Вот такая вот ошибка выходит после вызова
python manage.py collectstatic
  • Вопрос задан
  • 201 просмотр
Подписаться 1 Простой 6 комментариев
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы