[Checkins] SVN: plone.validatehook/trunk/ Moved to GitHub.
Stephen Richter
cvs-admin at zope.org
Sat Mar 2 02:10:34 UTC 2013
Log message for revision 129989:
Moved to GitHub.
Changed:
A plone.validatehook/trunk/MOVED_TO_GITHUB
D plone.validatehook/trunk/README.txt
D plone.validatehook/trunk/docs/
D plone.validatehook/trunk/plone/
D plone.validatehook/trunk/setup.cfg
D plone.validatehook/trunk/setup.py
-=-
Added: plone.validatehook/trunk/MOVED_TO_GITHUB
===================================================================
--- plone.validatehook/trunk/MOVED_TO_GITHUB (rev 0)
+++ plone.validatehook/trunk/MOVED_TO_GITHUB 2013-03-02 02:10:34 UTC (rev 129989)
@@ -0,0 +1 @@
+See https://github.com/zopefoundation/plone.validatehook
\ No newline at end of file
Deleted: plone.validatehook/trunk/README.txt
===================================================================
--- plone.validatehook/trunk/README.txt 2013-03-02 02:10:23 UTC (rev 129988)
+++ plone.validatehook/trunk/README.txt 2013-03-02 02:10:34 UTC (rev 129989)
@@ -1,53 +0,0 @@
-Introduction
-============
-
-This package provides a hook into Zope's ZPublisher that is run after
-the publisher has completed traversal and authentication, but before
-it tries to publish an object. This is practical for tasks such as
-tracking user activity.
-
-Hooks use `zope.event`_'s event mechanism using the
-plone.validatehook.interfaces.IPostValidationEvent. This is based on
-the standard ObjectEvent form `zope.component`_.
-
-The IPostValidationEvent event has two attributes: ``user`` which is the
-currently authenticated user object and ``request``, which is the current
-request object.
-
- *Keep in mind that even unauthenticated requests have a user
- object. If you only want to deal with 'normal' users make sure
- you ignore any instances of AccessControl.User.SpecialUser.*
-
-
-Example
-=======
-
-As an example we will write a bit of code which logs the id of the
-current user and the path to the current code. This is the code for
-the event handler::
-
- from zope.interface import Interface
- from zope.component import adapter
- from plone.validatehook.interfaces import IPostValidationEvent
- import logging
-
- logger = logging.getLogger("LogRequest")
-
- @adapter(Interface, IPostValidationEvent)
- def LogRequest(object, event):
- if getattr(object, "getPhysicalPath", None) is None:
- path="Unknown path"
- else:
- path="/".join(object.getPhysicalPath()
-
- logger.info("Request from user '%s' for object %s" %
- event.user.getId(), path)
-
-To use this code you need to register it in zcml::
-
- <subscriber handler=".events.LogRequest" />
-
-
-.. _zope.component: http://pypi.python.org/pypi/zope.component
-.. _zope.event: http://pypi.python.org/pypi/zope.event
-
Deleted: plone.validatehook/trunk/setup.cfg
===================================================================
--- plone.validatehook/trunk/setup.cfg 2013-03-02 02:10:23 UTC (rev 129988)
+++ plone.validatehook/trunk/setup.cfg 2013-03-02 02:10:34 UTC (rev 129989)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Deleted: plone.validatehook/trunk/setup.py
===================================================================
--- plone.validatehook/trunk/setup.py 2013-03-02 02:10:23 UTC (rev 129988)
+++ plone.validatehook/trunk/setup.py 2013-03-02 02:10:34 UTC (rev 129989)
@@ -1,35 +0,0 @@
-from setuptools import setup, find_packages
-import os
-
-version = '1.1'
-
-setup(name='plone.validatehook',
- version=version,
- description="Zope 2 publisher validation hook",
- long_description=open("README.txt").read() + "\n" +
- open(os.path.join("docs", "HISTORY.txt")).read(),
- classifiers=[
- "Environment :: Web Environment",
- "Framework :: Zope2",
- "License :: OSI Approved :: Zope Public License",
- "Programming Language :: Python",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
- keywords='',
- author='Wichert Akkerman',
- author_email='wichert at wiggy.net',
- license='ZPL',
- packages=find_packages(exclude=['ez_setup']),
- namespace_packages=['plone'],
- include_package_data=True,
- zip_safe=False,
- install_requires=[
- 'setuptools',
- 'zope.event',
- 'zope.interface',
- 'zope.component',
- ],
- entry_points="""
- """,
- )
-
More information about the checkins
mailing list