Skip to content

Commit bf51010

Browse files
committed
更新文档
1 parent 430f60c commit bf51010

File tree

2 files changed

+21
-30
lines changed

2 files changed

+21
-30
lines changed

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
🌍
44
*[English](/docs/README-en.md)[简体中文](README.md)*
55

6-
基于`python3.8``Django3.0`的博客。
6+
基于`python3.8``Django4.0`的博客。
77

88
[![Django CI](https://github.com/liangliangyy/DjangoBlog/actions/workflows/django.yml/badge.svg)](https://github.com/liangliangyy/DjangoBlog/actions/workflows/django.yml) [![CodeQL](https://github.com/liangliangyy/DjangoBlog/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/liangliangyy/DjangoBlog/actions/workflows/codeql-analysis.yml) [![codecov](https://codecov.io/gh/liangliangyy/DjangoBlog/branch/master/graph/badge.svg)](https://codecov.io/gh/liangliangyy/DjangoBlog) [![license](https://img.shields.io/github/license/liangliangyy/djangoblog.svg)]()
99

1010
## 主要功能:
11-
- 文章,页面,分类目录,标签的添加,删除,编辑等。文章及页面支持`Markdown`,支持代码高亮。
11+
- 文章,页面,分类目录,标签的添加,删除,编辑等。文章、评论及页面支持`Markdown`,支持代码高亮。
1212
- 支持文章全文搜索。
1313
- 完整的评论功能,包括发表回复评论,以及评论的邮件提醒,支持`Markdown`
1414
- 侧边栏功能,最新文章,最多阅读,标签云等。
1515
- 支持Oauth登陆,现已有Google,GitHub,facebook,微博,QQ登录。
16-
- 支持`Memcache`缓存,支持缓存自动刷新。
16+
- 支持`Redis`缓存,支持缓存自动刷新。
1717
- 简单的SEO功能,新建文章等会自动通知Google和百度。
1818
- 集成了简单的图床功能。
1919
- 集成`django-compressor`,自动压缩`css``js`
@@ -41,7 +41,7 @@ mysql客户端从`pymysql`修改成了`mysqlclient`,具体请参考 [pypi](htt
4141
4242
## 运行
4343
44-
修改`DjangoBlog/setting.py` 修改数据库配置,如下所示:
44+
修改`djangoblog/setting.py` 修改数据库配置,如下所示:
4545
4646
```python
4747
DATABASES = {
@@ -64,37 +64,32 @@ CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8
6464

6565
然后终端下执行:
6666
```bash
67-
./manage.py makemigrations
68-
./manage.py migrate
67+
python manage.py makemigrations
68+
python manage.py migrate
6969
```
7070

71-
**注意:** 在使用 `./manage.py` 之前需要确定你系统中的 `python` 命令是指向 `python 3.6` 及以上版本的。如果不是如此,请使用以下两种方式中的一种:
72-
73-
- 修改 `manage.py` 第一行 `#!/usr/bin/env python``#!/usr/bin/env python3`
74-
- 直接使用 `python3 ./manage.py makemigrations`
75-
7671
### 创建超级用户
7772

7873
终端下执行:
7974
```bash
80-
./manage.py createsuperuser
75+
python manage.py createsuperuser
8176
```
8277

8378
### 创建测试数据
8479
终端下执行:
8580
```bash
86-
./manage.py create_testdata
81+
python manage.py create_testdata
8782
```
8883

8984
### 收集静态文件
9085
终端下执行:  
9186
```bash
92-
./manage.py collectstatic --noinput
93-
./manage.py compress --force
87+
python manage.py collectstatic --noinput
88+
python manage.py compress --force
9489
```
9590

9691
### 开始运行:
97-
执行: `./manage.py runserver`
92+
执行: `python manage.py runserver`
9893

9994

10095
浏览器打开: http://127.0.0.1:8000/ 就可以看到效果了。
@@ -109,7 +104,7 @@ CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8
109104

110105

111106
## 更多配置:
112-
[更多配置介绍](/docs/config.md)
107+
[更多配置介绍](/docs/config.md)
113108
[集成elasticsearch](/docs/es.md)
114109

115110
## 问题相关

docs/README-en.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
🌍
44
*[English](README-en.md)[简体中文](README.md)*
55

6-
A blog system based on `python3.8` and `Django3.0`.
6+
A blog system based on `python3.8` and `Django4.0`.
77

88

99
[![Django CI](https://github.com/liangliangyy/DjangoBlog/actions/workflows/django.yml/badge.svg)](https://github.com/liangliangyy/DjangoBlog/actions/workflows/django.yml) [![CodeQL](https://github.com/liangliangyy/DjangoBlog/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/liangliangyy/DjangoBlog/actions/workflows/codeql-analysis.yml) [![codecov](https://codecov.io/gh/liangliangyy/DjangoBlog/branch/master/graph/badge.svg)](https://codecov.io/gh/liangliangyy/DjangoBlog) [![license](https://img.shields.io/github/license/liangliangyy/djangoblog.svg)]()
@@ -77,36 +77,32 @@ CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8
7777

7878
Run the following commands in Terminal:
7979
```bash
80-
./manage.py makemigrations
81-
./manage.py migrate
82-
```
83-
84-
**Attention: ** Before you using `./manage.py`, make sure the `python` command in your system is towards to `python 3.6` or above version. Otherwise you may solve this by one of the two following methods:
85-
- Modify the first line in `manage.py`, change `#!/usr/bin/env python` to `#!/usr/bin/env python3`
86-
- Just run with: `python3 ./manage.py makemigrations`
80+
python manage.py makemigrations
81+
python manage.py migrate
82+
```
8783

8884
### Create super user
8985

9086
Run command in terminal:
9187
```bash
92-
./manage.py createsuperuser
88+
python manage.py createsuperuser
9389
```
9490

9591
### Create testing data
9692
Run command in terminal:
9793
```bash
98-
./manage.py create_testdata
94+
python manage.py create_testdata
9995
```
10096

10197
### Collect static files
10298
Run command in terminal:
10399
```bash
104-
./manage.py collectstatic --noinput
105-
./manage.py compress --force
100+
python manage.py collectstatic --noinput
101+
python manage.py compress --force
106102
```
107103

108104
### Getting start to run server
109-
Execute: `./manage.py runserver`
105+
Execute: `python manage.py runserver`
110106

111107
Open up a browser and visit: http://127.0.0.1:8000/ , the you will see the blog.
112108

0 commit comments

Comments
 (0)