项目介绍
项目名称:ZL阅读分享
开发模式:企业主流-前后端分离模式
功能:
- 账号注册
- 账号登录 / 手机号登录
- 第三方登录 / qq / github / gitee
- 个人信息
- 绑定邮箱 / 绑定手机号
- 修改密码 / 重置密码
- 文章编辑
- 文章管理
- 文章推荐
- 用户管理
- 分类管理
- 标签管理
- 收藏管理
- 博客友链
- 客户端管理
- 首页
- 分类
- 归档
- 标签
- 友链
- 留言
- 文章 / 收藏 / 点赞 / 评论 / 回复 / 相关推荐
- 其他
- 打赏
接口文档
创建项目
配置项目
数据库配置
- 创建zlras数据库
- 安装mysqlclient模块
- 配置ZLRAS/settings.py
- 同步数据模型到MySQL数据库
mysql> create database zlras charset utf8mb4;
Query OK, 1 row affected (0.00 sec)
pip install mysqlclient
# settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost',
'NAME': 'zlras',
'USER': 'root',
'PASSWORD': 'xxx你的数据库密码'
}
}
(ZLRAS) D:\PycharmProjects\ZLRAS>python manage.py makemigrations
(ZLRAS) D:\PycharmProjects\ZLRAS>python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
语言时区设置
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
运行项目:
Django version 4.0, using settings 'ZLRAS.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.