简体   繁体   English

带粘贴功能的Plone 4.1自定义PAS插件

[英]Plone 4.1 Custom PAS plugin with paster

Trying to create custom pas plugin for authentication. 尝试创建自定义pas插件进行身份验证。 Doing this via paster 通过粘贴做到这一点

../bin/paster create -t plone_pas abc.xyz

now what I'm seeing in when its creates structure it take two dots in namespace and creating two identical dictionaries. 现在,我在创建结构时看到的内容是在命名空间中使用两个点并创建两个相同的字典。 structure of my pas product dictionaries is like: 我的pas产品字典的结构如下:

abc 
   xyz
   __init__.py
        xyz
        __init__.py

why its taking two dots in namespace. 为什么在命名空间中使用两个点。 Is there something I'm missing here? 我在这里想念什么吗?

first level of xyz dictionaries needed? 需要第一级的xyz词典?

This is an unfortunate restriction of the plone_pas paster template: it only knows how to create a package structure that is three levels deep. 不幸的是,这限制了plone_pas粘贴模板:它只知道如何创建三层深度的包结构。 So you should give a name like abc.def.xyz. 因此,您应提供一个名称,如abc.def.xyz。

Recommended is calling your package: pas.plugins.meaningfulname. 建议调用您的程序包:pas.plugins。有意义的名称。

Maurita is, of course, correct. 毛里塔当然是正确的。

If you use the 'zopeskel' command, you'll actually have validation applied to you package name, and you will be informed about the restriction. 如果您使用“ zopeskel”命令,则实际上会将验证应用于您的软件包名称,并且会收到有关限制的通知。 Try this: 尝试这个:

../bin/zopeskel plone_pas abc.xyz

You should get a message that tells you that a two-dot name is required for this template. 您应该收到一条消息,告诉您此模板需要一个两点名称。 The script should prompt you for a new name and allow you to re-enter something like abc.def.xyz 该脚本应提示您输入新名称,并允许您重新输入类似abc.def.xyz的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM