phith0n / minos Goto Github PK
View Code? Open in Web Editor NEW一个基于Tornado/mongodb/redis的社区系统。
License: Other
一个基于Tornado/mongodb/redis的社区系统。
License: Other
controller/base.py, Line 70 使用assert来判断用户是否已登陆。但是assert似乎仅用于debug用途,且当前的Python实现下使用-O选项运行后,AssertionError将永远不会发出。
这是否会引发-O模式下运行Minos时发生出人意料的问题?
https://docs.python.org/2/reference/simple_stmts.html#the-assert-statement
我发现 user.htm {% if user["username"] != current_user["username"] %}
判断的应该是你访问别人的页面和个人信息的情况,但是判断身份的地方判定的还是自己的power
在pycharm里运行时,会输出形如:
[I 180907 07:39:54 web:2162] 200 GET /manage/index (::1) 87.38ms
请问这些是怎么设置输出的呢
我的消息页面没分页
修改方法
controller/message.py/MessageHandler最后一行修改为
self.render("message.htm", messages=messages, count=count, cutstr=cutstr, page=page, each=limit)
html 模板增加
<div class="am-panel-footer">
{% raw pagenav(now = page, count = count, each = each, url = '/message/%d') %}
<div class="am-cf"></div>
</div>
最近在将这个论坛做一点修改,然后用于我们的 online judge 的论坛,完成后会按照协议开源。现在改的比较乱,就不 pr 了。
打算用minos做一个付费教学社区,不知道作者能否提供接口支持,支持支付宝即时到帐即可~~~~
你好,我安装了你的框架,这个是我的配置
"database":
"config": "mongodb://localhost:27017/"
"db": "minos"
"global":
"captcha":
"comment": !!bool "true"
"login": !!bool "true"
"register": !!bool "true"
"cookie_secret": !!python/unicode "secret-key"
"debug": !!bool "false"
"email":
"key": "key-xxxxx"
"method": "none"
"sender": "root@domain"
"url": "https://api.mailgun.net/v3/domain"
"imagepath": "./static/upimg"
"init_money": !!int "10"
"intranet": !!bool "true"
"invite_expire": !!int "604800"
"register": !!python/unicode "invite"
"site":
"description": "\u8FD9\u662F\u4E00\u4E2A\u79C1\u5BC6\u7684\u798F\u5229\u5171\u4EAB"
"keyword": "\u8BBA\u575B"
"webname": !!python/unicode "binbibi"
"session":
"db": !!int "1"
"host": "localhost"
"port": !!int "6379"
登录和注册都需要captcha,但是网站wjw加载不出来captcha.png,http的请求显示是404,请问我这个是怎么回事,怎么排查这个故障,在哪里查看log,
File "/home/work/Minos/controller/user.py", line 43, in detail_act
"username": {"$eq": username}
OperationFailure: database error: invalid operator: $eq
[E 150520 07:40:17 web:1825] 500 GET /user/detail (127.0.0.1) 7.15ms
我做了如下修改:
diff --git a/controller/user.py b/controller/user.py
"username": {"$eq": username}
"username": self.current_user["username"]
关于find_one函数,mongo中貌似没这个函数,
db.member.find
db.member.find( db.member.findAndModify( db.member.findOne(
一直不明白这个yield函数参数为什么要这样写?
user = yield self.db.member.find_one({
"username": {"$eq": username}
})
一图抵千文
关于mongo 的认证库
我这样写出错了。
提示:minos: ERROR (abnormal termination)
求教怎么弄啊~
[program:minos]
command=python /home/minos/mian.py --port=8765
autostart=true ; supervisord守护程序启动时自动启动tornado
autorestart=true ; supervisord守护程序重启时自动重启tornado
redirect_stderr=true ; 将stderr重定向到stdout
stdout_logfile = /home/minos/minos.log
刚刚下载了最新代码,发现文章发布后不论付费还是收费,都需要点击购买,直接导致免费文章无法正常查看
第一行是:
--index-url http://pypi.douban.com/simple/redis/
好像路径多了一个/redis,所以最后都从阿里云的pip镜像去下载了
如题,需要安装下面的库(为了安装pycurl):
apt-get install libcurl4-openssl-dev
作者你好,管理员帐号有没有写好的初始化脚本?
我使用python 2.7.14 安装出错如下:
ERROR: Package 'tornado' requires a different Python: 2.7.14 not in '>= 3.5'
也就是说 tornado>4.1 需要python>3.6,但是我使用python3.6安装报错如下:
Usage: pip [options]
ERROR: Invalid requirement: --allow-external PIL
pip: error: no such option: --allow-external
作者是否可以将以来信息写的更全面些,不放尝试下K神的pipenv
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.