Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Sonder-MX/Blogs-Django-Vue

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

个人博客(Django4+Vue3)

👉原教程传送.

预览

home

环境配置

  1. 安装 Pyhton (version >= 3.10)

    • 安装依赖
    • pip install -r requirements.txt
    • 或者 pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
  2. 安装 nodejs (version >= 18.14.0)

    • npm install -g @vue/cli

快速开始

准备

  1. 进入 blog_dv 文件夹下,依次执行以下命令,完成数据库的迁移(使用 sqlite 数据库):

    python manage.py makemigrations
    python manage.py migrate
  2. 创建超级用户:

    python manage.py createsuperuser  # 按提示创建超级用户
  3. 进入 frontend 文件夹下,执行以下命令:

    npm install

启动

  1. 进入 blog_dv 目录下,打开终端输入:python manage.py runserver
  2. 进入 frontend 目录下,打开一个新的终端:npm run dev
  3. 打开浏览器,输入地址:http://localhost:8000/admin/ 进入后台管理
  4. http://localhost:9000 进入客户端
  5. 完成!

About

前后端分离的博客系统,前端Vue3,后端Django4

Topics

Resources

License

Stars

Watchers

Forks

Morty Proxy This is a proxified and sanitized view of the page, visit original site.