小编Pau*_*Yin的帖子

如何在mutt中移动多个消息

在我的所有消息都在一个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消息移动到另一个目录?

email message command-line-interface mutt

27
推荐指数
1
解决办法
2万
查看次数

金字塔中的身份验证/授权工具

我按照文档组级安全性
写了这些:

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"

python security pyramid

1
推荐指数
1
解决办法
766
查看次数

选中单选按钮时,jQuery更改内容

有人可以给我一个简单的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)

html javascript jquery

1
推荐指数
1
解决办法
2万
查看次数