File: INSTALL.txt

package info (click to toggle)
zope-replacesupport 1.0.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 168 kB
  • ctags: 155
  • sloc: python: 743; makefile: 38; sh: 25
file content (77 lines) | stat: -rw-r--r-- 2,001 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

Installation Instructions for ReplaceSupport 1.0.2

Requires Zope 2.3 or higher

Also see http://www.zope.org/Members/shh/ReplaceSupport/


Simple Installation
-------------------

PRO: Very easy to apply (and remove)
CON: Fails to patch certain Folder derived objects

1. Untar the archive into your Products directory

2. Restart Zope

3. All your folders should now have an additional "Replace" tab


Advanced Installation: TransparentFolders-Style (RECOMMENDED)
-------------------------------------------------------------

PRO: The patch is applied before OFS initialization. This makes
     sure all relevant objects are patched properly. 
CON: Requires some file editing

1. Untar the archive into your Products directory

2. Edit ReplaceSupport/__init__.py and remove (comment out) the 
   last line reading

     import SimplePatch

3. Edit lib/python/OFS/__init__.py and append the following line:

     import Products.ReplaceSupport.AdvancedPatch

   PLEASE ALSO READ THE NOTES BELOW!

4. Restart Zope

5. All your folders should now have an additional "Replace" tab


Notes on changing OFS/__init__.py
---------------------------------

In case you are using other products that modify lib/python/OFS/__init__.py, 
for example TransparentFolders, you must take care of the order in which the 
patches are applied.

Always install TransparentFolders first; this Product overwrites 
OFS/__init__.py. It is recommended to apply the ReplaceSupport patch right 
after the TransparentFolders patch.

Your lib/python/OFS/__init__.py might look like:

   try:
       # Apply the TransparentFolders patch.
       import Products.TransparentFolders.TransparentFolderPatch
   except: pass # The patch may have been removed.

   try:
       # Apply the ReplaceSupport patch.
       import Products.ReplaceSupport.AdvancedPatch
   except: pass


Notes on Permissions
--------------------

If you do not see the "Replace" tab, make sure you have the 
"Search & replace in objects" permission set.