2 Star 1 Fork 2

匿名者 / DesertHawk

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

DesertHawk

www.ditanshow.com

安装依赖库

进入过程目录,直接执行pip3 install -r requirements.txt

安装mysql

  • 安装mysql并设置用户名密码,创建数据库blogtest

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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'blogtest',     # 数据库
        'USER': 'root',			# 用户名
        'PASSWORD': '123456',	# 密码
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}

迁移数据库

进入项目目录,执行

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

服务启动

进入项目目录,执行

./manage.py runserver 0.0.0.0:8080

浏览器输入 http://127.0.0.1:8080即可访问

创建超级管理员

进入项目目录,执行

./manage.py createsuperuser

后台管理

http://127.0.0.1:8080/admin进入admin页面,添加文章

Repository Comments ( 0 )

Sign in to post a comment

About

django搭建个人博客 expand collapse
JavaScript and 6 more languages
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/meiqizhang/DesertHawk.git
git@gitee.com:meiqizhang/DesertHawk.git
meiqizhang
DesertHawk
DesertHawk
master

Search