Giter Club home page Giter Club logo

djangoblog's Introduction

DjangoBlog

🌍 English简体中文

基于python3.10Django4.0的博客。

Django CI CodeQL codecov license

主要功能:

  • 文章,页面,分类目录,标签的添加,删除,编辑等。文章、评论及页面支持Markdown,支持代码高亮。
  • 支持文章全文搜索。
  • 完整的评论功能,包括发表回复评论,以及评论的邮件提醒,支持Markdown
  • 侧边栏功能,最新文章,最多阅读,标签云等。
  • 支持Oauth登陆,现已有Google,GitHub,facebook,微博,QQ登录。
  • 支持Redis缓存,支持缓存自动刷新。
  • 简单的SEO功能,新建文章等会自动通知Google和百度。
  • 集成了简单的图床功能。
  • 集成django-compressor,自动压缩cssjs
  • 网站异常邮件提醒,若有未捕捉到的异常会自动发送提醒邮件。
  • 集成了微信公众号功能,现在可以使用微信公众号来管理你的vps了。

安装

mysql客户端从pymysql修改成了mysqlclient,具体请参考 pypi 查看安装前的准备。

使用pip安装: pip install -Ur requirements.txt

如果你没有pip,使用如下方式安装:

运行

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

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

创建数据库

mysql数据库中执行:

CREATE DATABASE `djangoblog` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;

然后终端下执行:

python manage.py makemigrations
python manage.py migrate

创建超级用户

终端下执行:

python manage.py createsuperuser

创建测试数据

终端下执行:

python manage.py create_testdata

收集静态文件

终端下执行:  

python manage.py collectstatic --noinput
python manage.py compress --force

开始运行:

执行: python manage.py runserver

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

服务器部署

本地安装部署请参考 DjangoBlog部署教程 有详细的部署介绍.

本项目已经支持使用docker来部署,如果你有docker环境那么可以使用docker来部署,具体请参考:docker部署

更多配置:

更多配置介绍
集成elasticsearch

问题相关

有任何问题欢迎提Issue,或者将问题描述发送至我邮箱 liangliangyy#gmail.com.我会尽快解答.推荐提交Issue方式.


致大家🙋‍♀️🙋‍♂️

如果本项目帮助到了你,请在这里留下你的网址,让更多的人看到。 您的回复将会是我继续更新维护下去的动力。

捐赠

如果您觉得本项目对您有所帮助,欢迎您请我喝杯咖啡,您的支持是我最大的动力,您可以扫描下方二维码为我付款,谢谢。

支付宝:

微信:


感谢jetbrains

djangoblog's People

Contributors

liangliangyy avatar sunway910 avatar dependabot[bot] avatar hongweipeng avatar zlaiyyf avatar cclauss avatar ch3nnn avatar laozijiaojiangnan avatar stackia avatar xiuyuanjun avatar kentio avatar angelm512 avatar johnatandm avatar spaceack avatar mikolaje avatar deepxhm avatar

djangoblog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.