第 0024 题: 使用 Python 的 Web 框架,做一个 Web 版本 TodoList 应用。
我的Python版本
$ python --version
Python 3.6.4
python -m venv venv
在 Windows 下:
venv\Scripts\activate
类Unix系统下:
. venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations todo
python manage.py migrate
$ python manage.py createsuperuser
用户名 (leave blank to use 'mayi'):
电子邮件地址:
Password:
Password (again):
Superuser created successfully.
$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
January 06, 2019 - 18:32:25
Django version 2.1.5, using settings 'TodoList.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.