|
Revision 3519, 1.0 kB
(checked in by jmorliaguet, 2 years ago)
|
- add annotations to ZPublisher.HTTPRequest
if the application already uses REQUEST.annotations, there could be a problem though
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
############################################################################## |
|---|
| 2 |
# |
|---|
| 3 |
# Copyright (c) 2006 Nuxeo and Contributors. |
|---|
| 4 |
# All Rights Reserved. |
|---|
| 5 |
# |
|---|
| 6 |
# This software is subject to the provisions of the Zope Public License, |
|---|
| 7 |
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|---|
| 8 |
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|---|
| 9 |
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|---|
| 10 |
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|---|
| 11 |
# FOR A PARTICULAR PURPOSE. |
|---|
| 12 |
# |
|---|
| 13 |
############################################################################## |
|---|
| 14 |
""" |
|---|
| 15 |
|
|---|
| 16 |
$Id$ |
|---|
| 17 |
""" |
|---|
| 18 |
|
|---|
| 19 |
__docformat__ = "reStructuredText" |
|---|
| 20 |
|
|---|
| 21 |
from cpsskins.thememanager import ThemeManagementFolder |
|---|
| 22 |
|
|---|
| 23 |
def bypass(context): |
|---|
| 24 |
pass |
|---|
| 25 |
ThemeManagementFolder.manage_fixupOwnershipAfterAdd = bypass |
|---|
| 26 |
|
|---|
| 27 |
# add annotations to ZPublisher.HTTPRequest |
|---|
| 28 |
_MARKER = object() |
|---|
| 29 |
def addAnnotationsToRequest(event): |
|---|
| 30 |
request = event.request |
|---|
| 31 |
if request.get(u'annotations', _MARKER) is _MARKER: |
|---|
| 32 |
request.annotations = {} |
|---|