Reddit Code

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
 
(Links)
 
(未显示1个用户的10个中间版本)
第1行: 第1行:
 +
[[Reddit]] is open.
 +
[[Image:Reddit-Architecture.png|right|thumb|Reddit Architecture]]
 +
 +
==code==
 
获得代码
 
获得代码
 
  git clone http://code.reddit.com/repo/reddit.git
 
  git clone http://code.reddit.com/repo/reddit.git
 +
安装
 +
cd reddit/r2
 +
sudo python setup.py develop
 +
安装数据库
 +
su postgres or sudo -u postgres
 +
createdb -E utf8 reddit
 +
createdb -E utf8 changes
 +
createdb -E utf8 email
 +
psql reddit < ../sql/functions.sql
 +
 
 +
postgres$ paster shell example.ini
 +
>>>from r2.models import populatedb
 +
>>>populatedb.populate()
 +
 +
postgres$ createuser reddit
 +
postgres$ dropuser reddit
 +
postgres$ createuser -P reddit
 +
运行
 +
me$ memcached
 +
me$ paster serve --reload example.ini port=8080
 +
http://127.0.0.1:8080/ ok :) 跑起来了
 +
若图形验证不能工作
 +
me$ sudo aptitude install python-imaging
 +
more detail: http://code.reddit.com/wiki/RedditStartToFinish
 +
 +
==Debian==
 +
*[http://code.reddit.com/wiki/DependenciesOnDebian5 Reddit on Debian 5]
 +
 +
==[[Nginx]]==
 +
 +
==[[Lighttpd]]==
 +
 +
==INI==
 +
http://code.reddit.com/wiki/INISettings
 +
 +
==Style Guide==
 +
CSS: reddit/rs/rs/templates/reddit.css
 +
 +
Footer: reddit/rs/rs/templates/redditfooter.html
 +
 +
Header Logo: reddit/r2/r2/models/subreddit.py - Line 345
 +
 
==相关项目==
 
==相关项目==
 
*[[Pylons]]
 
*[[Pylons]]
 
*[[Python Paste]]
 
*[[Python Paste]]
==Links==
+
 
*http://code.reddit.com/
+
==链接==
 +
*[https://github.com/reddit/reddit/ reddit @ github]
 
*http://www.reddit.com/r/redditdev/
 
*http://www.reddit.com/r/redditdev/
 
*http://groups.google.com/group/reddit-dev
 
*http://groups.google.com/group/reddit-dev
 +
 +
[[category:reddit]]
 +
[[category:python]]

2015年8月27日 (四) 02:37的最后版本

Reddit is open.

Reddit Architecture

目录

[编辑] code

获得代码

git clone http://code.reddit.com/repo/reddit.git

安装

cd reddit/r2
sudo python setup.py develop

安装数据库

su postgres or sudo -u postgres
createdb -E utf8 reddit
createdb -E utf8 changes
createdb -E utf8 email
psql reddit < ../sql/functions.sql
 
postgres$ paster shell example.ini
>>>from r2.models import populatedb
>>>populatedb.populate()
postgres$ createuser reddit
postgres$ dropuser reddit
postgres$ createuser -P reddit

运行

me$ memcached
me$ paster serve --reload example.ini port=8080
http://127.0.0.1:8080/ ok :) 跑起来了
若图形验证不能工作
me$ sudo aptitude install python-imaging

more detail: http://code.reddit.com/wiki/RedditStartToFinish

[编辑] Debian

[编辑] Nginx

[编辑] Lighttpd

[编辑] INI

http://code.reddit.com/wiki/INISettings

[编辑] Style Guide

CSS: reddit/rs/rs/templates/reddit.css

Footer: reddit/rs/rs/templates/redditfooter.html

Header Logo: reddit/r2/r2/models/subreddit.py - Line 345

[编辑] 相关项目

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱