Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luhuadong/fctc-air-django
Web backend for FCTC-Air project
https://github.com/luhuadong/fctc-air-django
Last synced: 15 days ago
JSON representation
Web backend for FCTC-Air project
- Host: GitHub
- URL: https://github.com/luhuadong/fctc-air-django
- Owner: luhuadong
- License: gpl-2.0
- Created: 2020-06-30T00:22:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T23:29:16.000Z (almost 3 years ago)
- Last Synced: 2023-03-05T02:18:25.562Z (almost 2 years ago)
- Language: HTML
- Size: 667 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fctc-air-django
Web backend for FCTC-Air project## 环境搭建
### 安装 Python 虚拟环境
以 Ubuntu 为例,安装虚拟环境
```shell
sudo apt-get install python3-venv
```创建虚拟环境
```shell
python3.7 -m venv py37-venv
```激活虚拟环境
```shell
source py37-venv/bin/activate
```关闭虚拟环境
```shell
deactivate
```### 安装 Django
进入虚拟环境,安装 Django。
(1)在线安装 Django,指定版本安装,目前 2.2 LTS 的最新版为 2.2.16
```shell
pip install Django==2.2.16
```默认会安装:`Django==2.2.16` 和 `pytz==2020.1`
(2)检测当前是否安装 Django 及版本
```shell
python -m django --version2.2.16
```或者使用 `pip freeze` 命令检查
```shell
pip freeze | grep DjangoDjango==2.2.16
```此外,我们也可以先下载安装包,再指定安装包安装:
```shell
pip download django=2.2.16 -d ./
pip install Django-2.2.16-py2.py3-none-any.whl
```### 创建项目
```shell
django-admin startproject webserver
```### 运行项目
```shell
python manage.py runserver
```### 创建应用
```shell
python manage.py startapp devices
```