Git Product home page Git Product logo

collipa's Introduction

collipa

简介

The source of http://collipa.com

配置

mv config.back.py config.py

修改 collipa/config.py 文件:

数据库

  • _DBUSER = "username" # 数据库用户名
  • _DBPASS = "password" # 数据库密码
  • _DBHOST = "localhost" # 数据库地址
  • _DBNAME = "collipa" # 数据库名称

邮箱

  • _SMTPUSER = '[email protected]' # 邮箱用户名
  • _SMTPPASS = 'password' # 邮箱密码
  • _SMTPHOST = 'smtp.gmail.com' # 邮箱地址
  • _SMTPPORT = '587' # 邮箱端口

secret

  • cookie_secret = 'cookiesecret' # cookie secret 随机字符
  • password_secret = 'passwordsecret' # password secret 随机字符

安装必要扩展包

安装 MySQL

sudo apt-get install mysql-server

安装 memcached

sudo apt-get install memcached

安装 redis

sudo apt-get install redis-server

安装其他

sudo pip install -r requirements.txt

初始化数据库

python setup.py --init

运行

python app.py

License

Released under the WTFPL license:

http://www.wtfpl.net

collipa's People

Contributors

itsjw avatar laofo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collipa's Issues

初始化数据库报错pony.orm.core.TransactionError: db_session is required when working with the database

test@server:/collipa-master$ python setup.py --init
Traceback (most recent call last):
File "setup.py", line 77, in
main(sys.argv[1:])
File "setup.py", line 38, in main
if not Node.get(id=1):
File "/usr/local/lib/python2.7/dist-packages/pony/utils.py", line 81, in new_func
return old_func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2240, in get
objects = entity.find(1, kwargs) # can throw MultipleObjectsFoundError
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2280, in find
objects = entity.find_in_cache(pkval, avdict)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2288, in find_in_cache
cache = entity.get_cache()
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2553, in get_cache
return database._get_cache()
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 345, in _get_cache
): throw(TransactionError, 'db_session is required when working with the database')
File "/usr/local/lib/python2.7/dist-packages/pony/utils.py", line 108, in throw
raise exc
pony.orm.core.TransactionError: db_session is required when working with the database
test@server:
/collipa-master$

jquery-ui.triggeredAutocomplete.js could not been found

[E 130722 15:45:29 web:2144] Could not open static file '/....../collipa/static/js/ext/triggeredAutocomplete/jquery-ui.triggeredAutocomplete.js'

这个javascript 貌似没有提交到 github 上来,导致后台报错说无法打开这个文件

setup.py的 逻辑问题

在项目初始化 --install 的时候,需要安装requirements.txt 的东西, 然后setup.py本身依赖MySQLdb, 而MySQL-python 还没安装呢!

pony 貌似已经从lib移除了,改由从pypi下载, 但是setup.py 没有更新。

另外: 用到了redis, 但是requirements.txt 没提到。

用户头像无法更新

请修改根目录下 routers.py, 把以下两行代码上下交换下位置。否则用户头像无法更新
(r"/upload/(\w+)[/]", upload.UploadHandler),
(r"/upload/avatar[/]
", user.AvatarUploadHandler),

python aap.py

ImportError: No module named collipa.libs.tornadomail.backends.smtp

Object %s cannot be used after the database session is over

当作为管理员点击#设置#的时候,报下面错误。

File "/home/cmbuild/github/collipa/models/user.py", line 87, in str
return self.nickname or self.name
File "/usr/local/lib/python2.7/dist-packages/pony/utils.py", line 81, in new_func
return old_func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 874, in get
if not obj.cache.is_alive: throw_db_session_is_over(obj)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2699, in throw_db_session_is_over
throw(TransactionRolledBack, 'Object %s cannot be used after the database session is over' % obj)
File "/home/cmbuild/github/collipa/models/user.py", line 87, in ^Cstr
return self.nickname or self.name
File "/usr/local/lib/python2.7/dist-packages/pony/utils.py", line 81, in new_func
return old_func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 874, in get
if not obj.cache.is_alive: throw_db_session_is_over(obj)
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 2699, in throw_db_session_is_over
throw(TransactionRolledBack, 'Object %s cannot be used after the database session is over' % obj)

Resend the user accout activation email

情景是这样的:
第一次用一个邮箱注册了个账户,但是关于smtp 的配置错误,导致注册激活的邮件就没法出来。
等把smtp 改好后,每次登陆都提示请激活,但是因为之前没收到邮件所以无法激活。

这个时候应该在个人设置那里,提供一个更改注册邮箱 or 重新发送激活账户邮件的#button#, 点击再次发送邮件, 让 用户完成注册。

否则:用户无法收到邮件,也没办法改邮箱都不知道在哪里去激活账户

How to secure the websocket

So as the title says how i can secure the websocket ws://host/api/websocket .
I manage the cms under nginx with HSTS (forced SSL)

Translation to english

This should be done in a different branch(?). Also, it might help to translate the README.

IOError("decoder %s not available" % decoder_name)

[E 130722 17:01:50 web:1228] Uncaught exception POST /upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9 (192.168.10.149)
HTTPRequest(protocol='http', host='192.168.10.149:8008', method='POST', uri='/upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9', version='HTTP/1.1', remote_ip='192.168.10.149', headers={'Origin': 'http://192.168.10.149:8008', 'Content-Length': '156782', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Host': '192.168.10.149:8008', 'Accept': 'application/json, text/javascript, /; q=0.01', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://192.168.10.149:8008/account/setting', 'Cookie': '_xsrf=843696644fc140f99a301c6cafe76fb9; user="eyJ0b2tlbiI6ICJ4cDhrOExsVlo5eERJZGJpIiwgImlkIjogMX0=|1374225921|1d5dc482098a44a801c268ada984be4665249816"; index_category="ImRlc2VydCI=|1374482182|58be6c23e291f4a8f1451ab7369491d97de660d1"', 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryDeGLbwgBaBUcGUIP'})
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 1141, in _when_complete
callback()
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(_self.path_args, *_self.path_kwargs),
File "/usr/local/lib/python2.7/dist-packages/pony/orm/core.py", line 3563, in new_func
with self: return old_func(_args, *_kwargs)
File "/home/cmbuild/github/collipa/controllers/user.py", line 482, in post
image_one.save(tmp_name)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1406, in save
self.load()
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 189, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 385, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
[I 130722 17:01:50 web:1635] 302 POST /upload/avatar?_xsrf=843696644fc140f99a301c6cafe76fb9 (192.168.10.149) 24.20ms
[E 130722 17:01:50 web:796] Uncaught exception in write_error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 794, in send_error
self.write_error(status_code, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 827, in write_error
self.finish(self.get_error_html(status_code, *_kwargs))
File "/usr/local/lib/python2.7/dist-packages/tornado-3.1-py2.7.egg/tornado/web.py", line 728, in finish
raise RuntimeError("finish() called twice. May be caused "
RuntimeError: finish() called twice. May be caused by using async operations without the @asynchronous decorator.
[I 130722 17:01:50 web:1635] 200 GET / (192.168.10.149) 39.45ms

上传头像遇到上面的问题,貌似是处理图片的decoder 没有。

确认了一下 PIL 的确安装成功了

Background picture can't be shown correctly

设置那里可以上传图片的有三个地方:
个人头像显示成功
头部背景设置成功
背景图片设置成功,但是不知道这个图片在什么地方会显示出来?

我咋没看到这个图片显示的地方?

能否把节点像v2ex一样列到首页?

最好是首页的上面.

逛了一下collipa.com 发现节点底下各个小节点才是真正富含内容的地方,但是隐藏的有点深。如果用户不点击节点,很难发现这里内容这么多。

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.