You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
liangliangyy 95c7460fea
Merge branch 'dev'
9 years ago
DjangoBlog Merge branch 'dev' 9 years ago
accounts 页面头部url错误修复 9 years ago
bin 添加oauth验证,完善菜单功能 10 years ago
blog Merge branch 'dev' 9 years ago
comments 评论邮件创建线程发送 9 years ago
oauth 添加oauth验证,完善菜单功能 10 years ago
templates 页面头部url错误修复 9 years ago
.gitattributes 更改 github 对项目语言的识别, 改为 python. 10 years ago
.gitignore 修复评论bug 9 years ago
LICENSE Initial commit 10 years ago
README.md Update README.md 10 years ago
favicon.ico 完成分页功能 10 years ago
manage.py init 10 years ago
requirements.txt 添加site app 10 years ago
robots.txt sitemap和feed及其他部分优化 10 years ago

README.md

DjangoBlog

基于python3.5Django1.10的博客。

安装

使用pip安装
pip install -r requirements.txt

如果你没有pip使用如下方式安装
OS X / Linux 电脑,终端下执行:

curl http://peak.telecommunity.com/dist/ez_setup.py | python
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

windows电脑
下载 http://peak.telecommunity.com/dist/ez_setup.pyhttps://raw.github.com/pypa/pip/master/contrib/get-pip.py 这两个文件,双击运行。

运行

修改DjangoBlog/setting.py 修改数据库配置,如下所示:

 DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'djangoblog',
        'USER': 'root',
        'PASSWORD': 'password',
        'HOST': 'host',
        'PORT': 3306,
    }
}

创建数据库

终端下执行:

./manage.py makemigrations
./manage.py migrate  

开始运行:

执行:
./manage.py runserver

浏览器打开: http://127.0.0.1:8000/ 就可以看到效果了。