Back to index

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

Classes

class  ControllerValidator

Functions

def manage_addControllerValidator

Variables

tuple Python_magic = imp.get_magic()
int Script_magic = 3
tuple _log_complaint
tuple _default_file
list _marker = []
tuple manage_addControllerValidatorForm = PageTemplateFile('www/vpyAdd', globals())

Function Documentation

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

Definition at line 61 of file ControllerValidator.py.

00061 
00062 def manage_addControllerValidator(self, id, REQUEST=None, submit=None):
00063     """Add a Python script to a folder.
00064     """
00065     id = str(id)
00066     id = self._setObject(id, ControllerValidator(id))
00067     if REQUEST is not None:
00068         file = REQUEST.form.get('file', '')
00069         if not isinstance(file, str):
00070             file = file.read()
00071         if not file:
00072             file = open(_default_file).read()
00073         self._getOb(id).write(file)
00074         try: u = self.DestinationURL()
00075         except: u = REQUEST['URL1']
00076         if submit==" Add and Edit ": u="%s/%s" % (u,quote(id))
00077         REQUEST.RESPONSE.redirect(u+'/manage_main')
00078     return ''
00079 

Here is the call graph for this function:


Variable Documentation

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

Definition at line 51 of file ControllerValidator.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 44 of file ControllerValidator.py.

Definition at line 54 of file ControllerValidator.py.

tuple CMFFormController.ControllerValidator.manage_addControllerValidatorForm = PageTemplateFile('www/vpyAdd', globals())

Definition at line 58 of file ControllerValidator.py.

Definition at line 39 of file ControllerValidator.py.

Definition at line 43 of file ControllerValidator.py.