标签:next most version lib nat .com 设置 filters 使用
1 py -3 -m venv env
cd env
pip3 install django==1.11.11
pip3 install pylint pylint_django
python -c "import django; print(django.get_version())"
django-admin.py startproject mysite
cd mysite
python manage.py startapp polls
1 Traceback (most recent call last): 2 File "manage.py", line 22, in <module> 3 execute_from_command_line(sys.argv) 4 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line 5 utility.execute() 6 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 338, in execute 7 django.setup() 8 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\__init__.py", line 27, in setup 9 apps.populate(settings.INSTALLED_APPS) 10 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\apps\registry.py", line 85, in populate 11 app_config = AppConfig.create(entry) 12 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\apps\config.py", line 94, in create 13 module = import_module(entry) 14 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module 15 return _bootstrap._gcd_import(name[level:], package, level) 16 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 17 File "<frozen importlib._bootstrap>", line 983, in _find_and_load 18 File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked 19 File "<frozen importlib._bootstrap>", line 677, in _load_unlocked 20 File "<frozen importlib._bootstrap_external>", line 728, in exec_module 21 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed 22 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\__init__.py", line 4, in <module> 23 from django.contrib.admin.filters import ( 24 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\filters.py", line 10, in <module> 25 from django.contrib.admin.options import IncorrectLookupParameters 26 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\options.py", line 12, in <module> 27 from django.contrib.admin import helpers, widgets 28 File "C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\widgets.py", line 152 29 ‘%s=%s‘ % (k, v) for k, v in params.items(), 30 ^ 31 SyntaxError: Generator expression must be parenthesized
C:\Users\William\AppData\Local\Programs\Python\Python37\lib\site-packages\django\contrib\admin\widgets.py
python manage.py runserver 8001
Next, start your first app by running python manage.py startapp [app_label]
.
You‘re seeing this message because you have DEBUG = True
in your Django settings file and you haven‘t configured any URLs. Get to work!
VScode 搭建 django 开发环境(Win Python3.71 django1.11.11)
标签:next most version lib nat .com 设置 filters 使用
原文地址:https://www.cnblogs.com/WilliamB/p/10840556.html