• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Python
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

python写的博客,支持3种数据库,现在挂在evilbinary.org

MyBlog

"myblog"是清凉干净的一个开源django的博客,你可以随时下载使用。

特点

  • 兼容wordpress博客系统,数据从wordpress迁移过来毫无压力。
  • 支持markdown,SyntaxHighlighter语法高亮功能。
  • 支持多种数据库(sqlite、mysql等)。

在线演示

截图

  • 博客首页 前台博客
  • 博客后台管理 前台博客
  • 喜欢就支持一下,增加作者完善得动力. 喜欢就支持一下

安装说明

OS X

在苹果系统下安装很容易,首先下载源码,可以直接点击download下载,猛击这里,注意安全!,也可以在shell下输入:

git clone https://github.com/evilbinary/myblog.git

下载好后,如果是压缩包记得解压,进去后可以看到setup.py这个就是安装文件了,注意你需要有python环境,运行:

python setup.py install

或者

pip install -r requirements.txt`

然后让它自己安装,安装好后,到wsgi文件夹里面,有个叫mysite这个就是项目的路径,其他的文件不用管了,测试的东西,的点击进去,可以看到blog、manage.py、templates等,然后运行:

python manage.py collectstatic
python manage.py syncdb 

同步一下数据库,可能叫你输入第一次创建超级用户,你就输入一个用户,还有密码,成功后应该有个db.sqlite文件出来,再次运行:

python manage.py runserver

如果没看到错误,那就可以启动服务器了,让后打开浏览器输入:http://localhost:8000/就可以看到界面了。

Linux

同mac一样的操作

Windows

目前,还没时间搞,谁可以帮我测试测试看看,谢谢。

正式环境部署

如果有app engine之类的账号,比如openshift就可以在上面使用了。

使用用openshift-v3搭建

使用制作好的docker镜像

docker pull evilbinary/myblog
oc new-app  --docker-image=evilbinary/myblog

使用用openshift-v2搭建

1. MyBlog在OpenShift上使用

This git repository helps you get up and running quickly w/ a Django installation on OpenShift. The Django project name used in this repo is 'openshift' but you can feel free to change it. Right now the backend is sqlite3 and the database runtime is found in $OPENSHIFT_DATA_DIR/sqlite3.db.

Before you push this app for the first time, you will need to change the Django admin password. Then, when you first push this application to the cloud instance, the sqlite database is copied from wsgi/openshift/sqlite3.db with your newly changed login credentials. Other than the password change, this is the stock database that is created when python manage.py syncdb is run with only the admin app installed.

On subsequent pushes, a python manage.py syncdb is executed to make sure that any models you added are created in the DB. If you do anything that requires an alter table, you could add the alter statements in GIT_ROOT/.openshift/action_hooks/alter.sql and then use GIT_ROOT/.openshift/action_hooks/deploy to execute that script (make sure to back up your database w/ rhc app snapshot save first :) )

You can also turn on the DEBUG mode for Django application using the rhc env set DEBUG=True --app APP_NAME. If you do this, you'll get nicely formatted error pages in browser for HTTP 500 errors.

Do not forget to turn this environment variable off and fully restart the application when you finish:

$ rhc env unset DEBUG
$ rhc app stop && rhc app start

2. Running on OpenShift

Create an account at https://www.openshift.com

Install the RHC client tools if you have not already done so:

sudo gem install rhc
rhc setup

Create a python application

rhc app create django python-2.6

Add this upstream repo

cd django
git remote add upstream -m master git://github.com/openshift/django-example.git
git pull -s recursive -X theirs upstream master

Then push the repo upstream

git push

Here, the admin user name and password will be displayed, so pay special attention.

That's it. You can now checkout your application at:

http://django-$yournamespace.rhcloud.com

3. Admin user name and password

As the git push output scrolls by, keep an eye out for a line of output that starts with Django application credentials: . This line contains the generated admin password that you will need to begin administering your Django app. This is the only time the password will be displayed, so be sure to save it somewhere. You might want to pipe the output of the git push to a text file so you can grep for the password later.

More Repositories

1

TvWidget

tv常用效果控件,包括焦点、边框处理等。
Java
581
star
2

scheme-lib

鸭库 duck lib scheme for gui gles gl slib openal socket web mongodb box2d game glfw mysql libevent libuv uv json http client server android osx linux chezscheme scheme-lib
Scheme
466
star
3

duck-editor

基于scheme开发的鸭子编辑器
Scheme
196
star
4

YiYiYa

YiYiYa 一个os
C
173
star
5

HighlightTextEditor

An android HighlightTextEditor
Java
138
star
6

clear

clear 消除游戏 common lisp写的游戏
Common Lisp
24
star
7

robot

robot机器人 可以使用qq号码登录
Python
21
star
8

duck-compiler

🦆鸭子编译器
Scheme
21
star
9

duck-os

基于鸭子编译器写的os
Scheme
21
star
10

duck-typescript

A library for building cross-platform native desktop applications with TypeScript.
TypeScript
16
star
11

RScheme-for-android

RScheme for android 。运行在android上的scheme。
C
15
star
12

RScheme-for-ios

RScheme-for-ios ios lib and gui
C
9
star
13

wechat-pc

scheme写的高仿微信pc版聊天
Scheme
9
star
14

webrtc_lite

webrtc_lite 2016-08-31
C++
9
star
15

lisp--

lisp-- 一个可以跑sicp解释器的lisp--。
C
8
star
16

food

一个点菜的app,可以蓝牙或者无线网络点菜打单。
Java
6
star
17

eatery

eatery 食堂点餐
TypeScript
6
star
18

RScheme-for-windows

RScheme-for-windows run time library and example to call by c.
C
6
star
19

clock

时钟,c51单片机,汇编,有仿真电路图
Assembly
6
star
20

duck-learn

duck-learn 鸭子学习小站
5
star
21

duck

duck kernel
C
4
star
22

evilos

evilos 一个学习型的操作系统
C
4
star
23

OnlineJudge

java在线评判系统
Java
4
star
24

ymake

Python
3
star
25

duck-robot

duck-robot 一个基于qq开发的鸭子机器人。
JavaScript
3
star
26

typescript-pipeline

typescript-pipeline
TypeScript
2
star
27

etk-gui

etk-gui 一个mini的gui,可以用于嵌入式。
C
2
star
28

eqq-python

eqq python version
Python
2
star
29

glfont

gles font
Go
2
star
30

asm

以前汇编学习的代码。 my asm practice project
Assembly
2
star
31

Tank

一个Tank小游戏,自带物理引擎。
C++
2
star
32

foot

C
1
star
33

-

1
star
34

android-vnc-server

Automatically exported from code.google.com/p/android-vnc-server
C
1
star