Giter VIP home page Giter VIP logo

blog-1's Introduction

Python

A free, open-source blog system based on Django + MySql + jQuery + bootstrap + markdown

目前已实现功能:

1、用户注册、登陆、上传用户头像

2、文章发表,分类,标签集合,最热文章、最新评论展示

3、评论, 点赞, 显示用户评论过的文章

4、文件上传、下载

5、用户权限控制

6、二维码转换

7、站点缓存

8、完整的测试

9、jQuery, bootstrap, markdown支持

10、haystack + whoosh + jieba 搜索

11、logging记录log信息

12、主从数据库(详情可以进入网站http://cblog.xyz)

目前项目已部署在阿里云服务器中,<a href='http://cblog.xyz' target='_blank'>网址为http://cblog.xyz

使用说明:

1、安装依赖包
$ pip install -r requirements.txt

2、创建MySql数据库
在linux shell中登陆mysql: $mysql -u root -p
创建Blog数据库: myql>CREATE DATEBASE 'Blog' DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
创建mysql普通用户: mysql>INSERT INTO mysql.user(Host,User,Password) VALUES('localhost', 'your_username', password('your_password'));
为用户授权: mysql>grant all on Blog.* to your_username@loacalhost identified by 'your_password';
退出数据库: mysql>exit

3、在settings.py所在目录创建个人配置文件mysettings.py(或者直接修改settings.py中的DATABASE配置)
#coding:utf-8
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'Blog',
'USER': 'your_username',
'PASSWORD': 'your_password',
'HOST': '127.0.0.1',
'PORT': '3306'
}
}

4、创建数据库table
在manage.py目录执行:

 $ python manage.py migrate

5、运行服务器
python manage.py runserver 8080

接下来就可以在浏览器访问localhost:8080

ps:如果用apache2或者nginx运行时,访问具体文章速度很慢时,可以查看apache2或者nginx的log。如果是jieba那边提示Operation not permitted,那么就查看/tmp/jieba.cache的权限是否为774,如果不是请修改为774

blog-1's People

Contributors

caitinggui avatar mk100120 avatar catroll avatar

Stargazers

Jerusalemsbell avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

jerusalemsbell

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.