项目启动问题

来源:6-3 配置url和静态文件

魂魄妖夜

2020-06-21

Watching for file changes with StatReloader
Exception in thread Thread-1:
Traceback (most recent call last):
File “F:\Python\anaconda3\envs\Message\lib\threading.py”, line 926, in _bo
otstrap_inner
self.run()
File “F:\Python\anaconda3\envs\Message\lib\threading.py”, line 870, in run

self._target(*self._args, **self._kwargs)

File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 54, in wrapper
fn(*args, **kwargs)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\commands\runserver.py”, line 109, in inner_run
autoreload.raise_last_exception()
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 77, in raise_last_exception
raise exception0.with_traceback(exception[2])
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 54, in wrapper
fn(*args, **kwargs)
File "F:\Python\anaconda3\envs\Message\lib\site-packages\django_init
.p
y", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\apps\regis
try.py”, line 91, in populate
app_config = AppConfig.create(entry)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\apps\confi
g.py”, line 116, in create
mod = import_module(mod_path)
File "F:\Python\anaconda3\envs\Message\lib\importlib_init
.py", line 12
7, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

File “

ModuleNotFoundError: No module named ‘message_form’

Traceback (most recent call last):
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\apps\regis
try.py”, line 155, in get_app_config
return self.app_configs[app_label]
KeyError: ‘admin’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement_init_.py”, line 381, in execute_from_command_line
utility.execute()
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement_init_.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\commands\runserver.py”, line 60, in execute
super().execute(*args, **options)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\base.py”, line 364, in execute
output = self.handle(*args, **options)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\commands\runserver.py”, line 95, in handle
self.run(**options)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\core\manag
ement\commands\runserver.py”, line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 579, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 564, in start_django
reloader.run(django_main_thread)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\auto
reload.py”, line 272, in run
get_resolver().urlconf_module
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\utils\func
tional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “F:\Python\anaconda3\envs\Message\lib\site-packages\django\urls\resol
vers.py”, line 564, in urlconf_module
return import_module(self.urlconf_name)
File “F:\Python\anaconda3\envs\Message\lib\importlib_init_.py”, line 12
7, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

File “

写回答

2回答

魂魄妖夜

提问者

2020-06-21

重装一遍后排查出来就是settings.py中手动输入'apps.message_form.apps.MessageFormConfig',这个后出现的,应该和apps的路径配置有关,麻烦解答

0
0

魂魄妖夜

提问者

2020-06-21

太长了,最后的error显示如下,晚上查出来的都是说和数据库有关,明显不适用此处

LookupError: No installed app with label 'admin'.

0
10
魂魄妖夜
回复
慕勒7269962
我晚上回去后试试看
2020-07-10
共10条回复

Django+ xadmin 开发在线教育网站

一套通用的技术组合拳,助你解决大部分Python类网站后端问题

1911 学习 · 2149 问题

查看课程