Scripts posted recently tagged to zope3 in Kelpi

1- 10 of 18.

Use a custom lexicon and splitter with Zope3 Catalog

to zope zope3 custom splitter lexicon python by anonymous

from zope.app.catalog.catalog import Catalog
from zope.app.catalog.text import TextIndex
from zope.index.text.interfaces import ISearchableText
from zope.index.text.lexicon import Lexicon, CaseNormalizer, StopWordRemover
import re

template for z3c.form PasswordWidget with javascript confirmation

to zope3 z3c.form javascript password widget confirmation by anonymous

<tal:block tal:define="diffpw   string:You did not type the same password;
                       ok       string:ok;
                       notequal string:not equal;">
<input type="password" id="" name="" class="" title="" lang="" disabled=""
       readonly="" alt="" tabindex="" accesskey="" size="" maxlength=""

Create a new WSGI application with zopeproject

to bash zope3 zopeproject wsgi by nando.quintana

$ easy_install zopeproject
$ zopeproject WebApp
$ cd WebApp
$ bin/paster serve deploy.ini
$ bin/webapp-ctl fg

configure.zcml - memcached lovely package for zope3

to xml zcml zope3 memcached by nando.quintana

<configure 
    xmlns="http://namespaces.zope.org/zope"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="zope"
    >

__init__.py convert a directory in a zope3 module

to python zope zope3 module init by nando.quintana

# this is a namespace package
try:
    import pkg_resources
    pkg_resources.declare_namespace(__name__)
except ImportError:

Fast zpt batching in zope3

to python zope3 batching by nando.quintana

from zope.publisher.browser import BrowserView
from zope.app import zapi
from zope.app.catalog.interfaces import ICatalog
from z3c.batching import Batch
class Search(BrowserView):

Zope3 application instantiation without ZMI

to python zope3 by nando.quintana

from zope.app.appsetup.interfaces import IDatabaseOpenedWithRootEvent
from zope.app.appsetup.bootstrap import getInformationFromEvent
@adapter(IDatabaseOpenedWithRootEvent)
def addFoobar(event):
    db, connection, root, root_folder = getInformationFromEvent(event)

login in zope3

to python zope3 kelpi pau by anonymous

File Edit Options Buffers Tools IM-Python Python Help
from zope.publisher.browser import BrowserPage, BrowserView
from zope.app.pagetemplate import ViewPageTemplateFile
from zope.app.security.interfaces import IUnauthenticatedPrincipal
from zope.app.session.interfaces import ISession

Configure some security views for PAU

to xml zcml zope3 by nando.quintana

<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser"
           xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
           xmlns:i18n="http://namespaces.zope.org/i18n"
           i18n_domain="kelpi" >

User registering and role assignment for PAU

to python zope3 pau by nando.quintana

from zope.interface import implements, implementedBy
from zope.component import adapts
from zope.app import zapi
from zope.app.authentication.principalfolder import InternalPrincipal
from zope.app.security.interfaces import IAuthentication
hits counter