Giter Site home page Giter Site logo

myblog's Introduction

#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

然后让它自己安装,安装好后,到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搭建。 ###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.

myblog's People

Contributors

evilbinary avatar danmcp avatar dblado avatar andrejtokarcik avatar nhr avatar gshipley avatar banzaiman avatar mrunalp avatar coldfire-x avatar mfojtik avatar iepathos avatar bparees avatar dveeden avatar zemanel avatar lmacken avatar thesteve0 avatar jay-johnson avatar

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.