Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFFormController.ControllerPythonScript Namespace Reference

Classes

class  ControllerPythonScript

Functions

def manage_addControllerPythonScript

Variables

tuple Python_magic = imp.get_magic()
int Script_magic = 3
tuple _log_complaint
tuple _default_file
list _marker = []
tuple _first_indent = re.compile('(?m)^ *(?! |$)')
tuple _nonempty_line = re.compile('(?m)^(.*\S.*)$')
tuple manage_addControllerPythonScriptForm = PageTemplateFile('www/cpyAdd', globals())

Function Documentation

def CMFFormController.ControllerPythonScript.manage_addControllerPythonScript (   self,
  id,
  REQUEST = None,
  submit = None 
)
Add a Python script to a folder.

Definition at line 68 of file ControllerPythonScript.py.

00068 
00069 def manage_addControllerPythonScript(self, id, REQUEST=None, submit=None):
00070     """Add a Python script to a folder.
00071     """
00072     id = str(id)
00073     id = self._setObject(id, ControllerPythonScript(id))
00074     if REQUEST is not None:
00075         file = REQUEST.form.get('file', '')
00076         if not isinstance(file, str):
00077             file = file.read()
00078         if not file:
00079             file = open(_default_file).read()
00080         self._getOb(id).write(file)
00081         try: u = self.DestinationURL()
00082         except: u = REQUEST['URL1']
00083         if submit==" Add and Edit ": u="%s/%s" % (u,quote(id))
00084         REQUEST.RESPONSE.redirect(u+'/manage_main')
00085     return ''
00086 

Here is the call graph for this function:


Variable Documentation

Initial value:
00001 os.path.join(package_home(globals()),
00002                              'www', 'default_cpy')

Definition at line 54 of file ControllerPythonScript.py.

tuple CMFFormController.ControllerPythonScript._first_indent = re.compile('(?m)^ *(?! |$)')

Definition at line 60 of file ControllerPythonScript.py.

Initial value:
00001 (
00002     'Some of your Scripts have stale code cached.  Since Zope cannot'
00003     ' use this code, startup will be slightly slower until these Scripts'
00004     ' are edited. You can automatically recompile all Scripts that have'
00005     ' this problem by visiting /manage_addProduct/PythonScripts/recompile'
00006     ' of your server in a browser.')

Definition at line 47 of file ControllerPythonScript.py.

Definition at line 57 of file ControllerPythonScript.py.

tuple CMFFormController.ControllerPythonScript._nonempty_line = re.compile('(?m)^(.*\S.*)$')

Definition at line 61 of file ControllerPythonScript.py.

tuple CMFFormController.ControllerPythonScript.manage_addControllerPythonScriptForm = PageTemplateFile('www/cpyAdd', globals())

Definition at line 65 of file ControllerPythonScript.py.

Definition at line 42 of file ControllerPythonScript.py.

Definition at line 46 of file ControllerPythonScript.py.