我有一些需要与HTML页面进行交互的python代码。为此,我必须使用Django Framework。因为我对此很陌生,所以我不怎么做。
我已使用以下命令在系统上安装了Django: pip install django
运行此命令后,我得到以下输出:
Collecting django
Downloading https://files.pythonhosted.org/packages/b2/79/df0ffea7bf1e02c073c2633702c90f4384645c40a1dd09a308e02ef0c817/Django-2.2.6-py3-none-any.whl (7.5MB)
Requirement already satisfied: pytz in c:\users\hisingh\appdata\local\continuum\anaconda3\lib\site-packages (from django) (2019.1)
Collecting sqlparse (from django)
Downloading https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Installing collected packages: sqlparse,django
Successfully installed django-2.2.6 sqlparse-0.3.0
Note: you may need to restart the kernel to use updated packages.
现在,我想创建我的第一个django项目。我正在尝试通过运行以下命令来通过Jupyter笔记本执行此操作:
django-admin FirstProject
输出:
File "<ipython-input-5-c29723f55035>",line 1
django-admin FirstProject
^
SyntaxError: invalid syntax
有人可以指导我这样做吗?任何帮助将不胜感激。