搞定xadmin配置的前三个步骤后,第四个步骤,运行manage.py出bug
来源:9-2 通过django内置的login完成登录
曾嘱咐
2022-04-18
无法提取 “MxOnline” 模块中的实际命令: Python 进程死亡,代码为 1: Traceback (most recent call last):
File “C:\Users\86187\AppData\Roaming\Python\Python39\site-packages\django\apps\config.py”, line 118, in create
cls = getattr(mod, cls_name)
AttributeError: module ‘apps.users.apps’ has no attribute ‘UsersConfigcrispy_forms’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:\pycharm\PyCharm 2021.2.3\plugins\python\helpers\pycharm_jb_manage_tasks_provider.py”, line 25, in
django.setup()
File “C:\Users\86187\AppData\Roaming\Python\Python39\site-packages\django_init_.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “C:\Users\86187\AppData\Roaming\Python\Python39\site-packages\django\apps\registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
File “C:\Users\86187\AppData\Roaming\Python\Python39\site-packages\django\apps\config.py”, line 132, in create
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: ‘apps.users.apps’ does not contain a class ‘UsersConfigcrispy_forms’. Choices are: ‘UsersConfig’.
3回答
-
曾嘱咐
提问者
2022-04-19
我又重新用django的2.2.28和python3.7做了一遍,本来以为没bug了,后来发现settings里面少安装了4个APP,加上之后又报错了.但是注释掉却没有bug
012022-04-19 -
曾嘱咐
提问者
2022-04-18
也许切换版本后,不需要重新用命令新建项目,只需要修改settings.py和url.py.
版本兼容的问题令我好头疼,现在django2.2好像也要不支持了,以后或许要用3.2了
00 -
曾嘱咐
提问者
2022-04-18
在pycharm中将解释器中django切换到2.2.8版本,重新新建项目后,无报错了.
之前pycharm新建的是django的4.0.4版本
012022-04-21
相似问题
回答 3
回答 5