在我的所有消息都在一个maildir之前.现在我想将所有arch-general邮件移动到另一个邮件.
从这里,我看到:
"move" as we know it from other places is "save" in mutt.
"save" as we know it from other places is "copy" in mutt.
~e EXPR message which contains EXPR in the ``Sender'' field
Run Code Online (Sandbox Code Playgroud)
所以我在索引中使用模式
'T' and '~e arch-general' then 's'
Run Code Online (Sandbox Code Playgroud)
但只有一条信息被移动了.
如何将所有pattterned消息移动到另一个目录?
我按照文档组级安全性
写了这些:
def groupfinder(userid, request):
print '#'*80
print userid
role = DBSession.query(Role)....
if role.name == "Admin":
return ['g:admin']
class RootFactory(object):
__acl__ = [
(Allow, Everyone, 'view'),
(Allow, Authenticated, 'edit'),
(Allow, 'g:admin', 'admin')
]
def __init__(self, request):
pass
authn_policy = AuthTktAuthenticationPolicy(
settings['auth.secret'],
callback=groupfinder,
)
Run Code Online (Sandbox Code Playgroud)
它工作,但每个页面加载它反复查询数据库
只是在用户登录时第一次返回权限?
或者我做错了...
以及我如何知道像mako这样的模板中的权限"g:admin"
有人可以给我一个简单的jQuery代码的帮助,当点击不同的无线电bottuon然后显示不同的内容.
http://jsfiddle.net/AXsVY/
HTML
<label class="radio inline">
<input id="up_radio" type="radio" name="optionsRadios" value="update" checked>
Update
</label>
<label class="radio inline">
<input id="ov_radio" type="radio" name="optionsRadios" value="overwritten">
Overwritten
</label>
<p id="cont">
sth. here
</p>
Run Code Online (Sandbox Code Playgroud)
JavaScript的
$("#up_radio").click(function(){
if ($("#up_radio").is(":checked")) {
//change to "show update"
$("#cont").value = "show update";
} else if ($("#ov_radio").is(":checked")) {
// change to "show overwritten"
}
});
Run Code Online (Sandbox Code Playgroud)