我是 Django 的新手,我正在尝试创建一个超级用户(我在 Linux mint 上),每次我遇到一个非常奇怪的错误,这是我在其他 Django 项目中没有遇到的。错误如下:(除了在已安装的应用程序列表中添加我的应用程序和在 urls 中应用程序的 url 之外,我没有修改 django 项目中的任何内容。)
File "/home/user/.local/lib/python3.6/site-packages/django/urls/resolvers.py", line 538, in url_patterns
iter(patterns)
TypeError: 'module' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/user/.local/lib/python3.6/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 59, in execute
return super().execute(*args, **options)
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/base.py", line 332, in execute
self.check()
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/base.py", line 364, in check
include_deployment_checks=include_deployment_checks,
File "/home/user/.local/lib/python3.6/site-packages/django/core/management/base.py", line 351, in _run_checks
return checks.run_checks(**kwargs)
File "/home/user/.local/lib/python3.6/site-packages/django/core/checks/registry.py", line 73, in run_checks
new_errors = check(app_configs=app_configs)
你能告诉我我在做什么错吗?我尝试创建一个虚拟环境,但它不起作用。
慕虎7371278
噜噜哒
相关分类