File: PythonScript.py

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 (24 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

from Products.ReplaceSupport.ReplaceHandler import ReplaceHandler

__handler_class_name__ = 'PythonScriptHandler'

class PythonScriptHandler( ReplaceHandler ):
	'''search & replace in PythonScripts'''

	def getMetaType( self ):
		return 'Script (Python)'
	
	def getChangePermission( self ):
		return 'Change Python Scripts'

	def getBody( self, ob ):
		return ob.body()

	def getParams( self, ob ):
		return ob.params()
	
	def manageEdit( self, ob, body, params='' ):
		ob.ZPythonScript_edit( params, body )