80 lines
2.2 KiB
Plaintext
80 lines
2.2 KiB
Plaintext
|
Django 文档大纲:https://docs.djangoproject.com/en/2.0/contents/
|
|||
|
Django 详细文档:https://docs.djangoproject.com/en/2.0/
|
|||
|
|
|||
|
#### 把项目现在本地跑起来
|
|||
|
1. 在本地配置好所需要的package:
|
|||
|
|
|||
|
(1)然后安装对应的模块:
|
|||
|
因为pip库中有些三个包找不到,所以事先将这几个包下载好。详情见补充
|
|||
|
然后执行:
|
|||
|
```shell
|
|||
|
pip install -r requirements.txt
|
|||
|
```
|
|||
|
|
|||
|
2. 配置好数据库
|
|||
|
|
|||
|
如果需要导入大文件,按照以下链接操作后并重启数据库:http://azureyu.com/LargeSqlFile/
|
|||
|
(1)将sql文件导入数据库
|
|||
|
```shell
|
|||
|
mysql -u username -p database_name < file.sql
|
|||
|
```
|
|||
|
(2)修改settings.py中”DATABASES“块的内容
|
|||
|
|
|||
|
3. 启动项目:(进入项目的根路径,运行)
|
|||
|
```python
|
|||
|
python manage.py runserver
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
### 补充
|
|||
|
|
|||
|
#### 安装xadmin:
|
|||
|
如果Django版本低于2.0:直接执行
|
|||
|
```
|
|||
|
pip install xadmin
|
|||
|
```
|
|||
|
如果Django高于或等于2.0的版本,需要安装xadmin项目django2分支的代码。
|
|||
|
```
|
|||
|
pip install git+git://github.com/sshwsfc/xadmin.git@django2
|
|||
|
```
|
|||
|
另外,上述方法有时候速度非常慢,下面是一种替代方法:
|
|||
|
打开xadmin的GitHub页面并切换到django2分支(点击进入django2分支);
|
|||
|
点击右边的“Clone or download”绿色按钮,选择“Download ZIP”,下载zip包到本地;
|
|||
|
执行以下命令安装:
|
|||
|
```
|
|||
|
wget https://github.com/sshwsfc/xadmin/archive/django2.zip
|
|||
|
pip install --cache-dir . django2.zip
|
|||
|
rm django2.zip
|
|||
|
```
|
|||
|
#### 安装django-suit==2.0a1
|
|||
|
```
|
|||
|
pip install https://github.com/darklow/django-suit/tarball/v2
|
|||
|
```
|
|||
|

|
|||
|
查找
|
|||
|
|
|||
|
#### 安装mysql-client:
|
|||
|
apt-get install libmysqlclient-dev python3-dev
|
|||
|
pip install mysqlclient==1.3.12
|
|||
|
|
|||
|
|
|||
|
#### install
|
|||
|
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
|
|||
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
|||
|
echo "LANG=en_US.UTF-8" > /etc/locale.conf
|
|||
|
locale-gen en_US.UTF-8
|
|||
|
|
|||
|
https://github.com/wrmswindmill/codepedia.git
|
|||
|
|
|||
|
|
|||
|
为了更好更准确的收集用户的数据,更准确的推荐用户问题,收集用户行为数据。更符合用户的使用体验而做的一次升级
|
|||
|
保留了原有的好的特性,改进了相应的操作。
|
|||
|
|
|||
|
主要分为几个方面:
|
|||
|
1.类IDE的操作体验:左侧项目结构,
|
|||
|
2.更细粒度的标注
|
|||
|
3.跳转
|
|||
|
4.更详细的文件夹展示结构
|
|||
|
|
|||
|
|