[Zope-dev] leave application in zpt + formulator

2003-06-20 Thread nagendra prasad
hi
i had downloaded leave.zexp from the following url
http://www.openflow.it/EN/Download/index_html
I have installded open flow 1.1.0 
i have plone,zope on ,my linux box.
Now i tried to rewrite the application using zpt +
formulator(originally written in dtml).
I have written the following zpt files 
1)leave_startform_zpt
2)leave_start_zpt 
 a macro leaveform_macro for leave_startform_zpt
file.
Now my program goes like this
leave_startform_zpt -- macros -- leave_start_zpt --
gotoOF  (this is a python file),

Plz see the files in the attachemnt. These are the
files i have added. the other files remain same. no
change 

I get the following error like
Error Type 
NameError
Error Value 
global name 'workflow' is not defined

what is the problem
plz help me
thanks
prasad


Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/
1)  leave_startform_zpt
---
html
headtb
title tal:content=template/titleThe title/title
head
body
p metal:use-macro=here/common_pages/macros/leaveform_macro /
/body
/html
---

2)  leaveform_macro

---

div metal:define-macro=leaveform_macro

form name=leave_startform_formulator method=post action=leave_start_zpt

table tal:define=form here/leave_startform_formulator align=center
tr tal:define=startdate request/startdate|nothing
   th align=left
font size=5font face=verdanab
 Start Date:
/b/font/font
   /th
   tdinput type=text name=startdate
   tal:replace=structure python:form.startdate.render(startdate) /
   /td
 /tr
  tr tal:define=enddate request/enddate|nothing
   th align=left
font size=5font face=verdanab
 End Date:
/b/font/font
   /th
   tdinput type=text name=enddate
  tal:replace=structure python:form.enddate.render(enddate)
   /td
 /tr
  tr tal:define=reason request/reason|nothing
   th align=left
font size=4font face=verdanab
 Reason:
/b/font/font
   /th
   tdtextarea type=text name=reason
  tal:replace=structure python:form.reason.render(reason)/textarea
   /td
 /tr
  tr tal:define=leavetype request/leavetype|nothing
   th align=left
font size=4font face=verdanab
 LEA:
/b/font/font
   /th
   tdtextarea type=text name=leavetype
  tal:replace=structure 
python:form.leavetype.render(leavetype)/textarea
   /td
 /tr
  




tr cols=*,350,*
   td /td
   td align=centerinput type=submit value=  Submit  /td
   td /td
 /tr
/tablebr

/form
/div
---


3)  leave_start_zpt
---

html
head
!-- Put your CSS, meta tags and scripts here. --
/head
body bgcolor=#ff
p tal:replace=structure python:here.gotoOF() /
!--p tal:replace=structure 
python:here.gotoOF(startdate,enddate,reason,leavetype,requested,formalia,approved,decision)
 /--
!--span tal:define=result python:here.mailScript()/span--


/body
/html
---

4)  gotoOF

---
no parametres for this.


instance=workflow.addInstance('leaverequest',AUTHENTICATED_USER.getUserName(),'no 
comment','Request for leave by ' +  AUTHENTICATED_USER.getUserName(),  activation=0)
instobj=_.getattr(workflow,instance)



form = context.leave_startform_formulator
instobj=getattr(workflow,instance)


instobj.manage_addProperty('startdate', startdate, 'string')
instobj.manage_addProperty('enddate', enddate, 'string')
instobj.manage_addProperty('reason', reason, 'text')
instobj.manage_addProperty('leavetype', leavetype, 'string')
instobj.manage_addProperty('requested', '', 'string')
instobj.manage_addProperty('formalia', '', 'string')
instobj.manage_addProperty('approved', '', 'string')
instobj.manage_addProperty('decision', '', 'text')
workflow.startInstance(instance)
print Done
return printed
---

[Zope-dev] Problems with archetypes running on plone in zope

2003-06-06 Thread nagendra prasad
Hi , i have installed plone rpm on rh8 linux,
Apparently zope, cmf also got installed which i really
needed.Later installed archetypes in plone.

Now when i use any of the archetypes stuff like
Archetypescontent example, tool i get the following
error on clicking the view tab. 
-
Site Error
An error was encountered while publishing this
resource. 

ImportError

Sorry, a site error occurred.

Traceback (innermost last): 

Module ZPublisher.Publish, line 150, in publish_module

Module Products.Localizer, line 58, in new_publish 
Module ZPublisher.Publish, line 114, in publish 
Module Zope.App.startup, line 182, in
zpublisher_exception_hook 
Module ZPublisher.Publish, line 98, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 39, in call_object 
Module Products.Archetypes.ArchetypeTool, line 490, in
manage_addSchema 
Module Products.Archetypes.ArchetypeTool, line 192, in
__init__ 
Module Products.Archetypes.ArchetypeTool, line 203, in
compileSchema 
Module string, line 1, in ? 
ImportError: No module named 
--
what is the problem.plz help me
thanks
prasad


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Login problems

2003-06-05 Thread nagendra prasad
Hi,
We have installed zope-2.6.2b2-1.i386.rpm downloaded
from zope.org.
we have used red-carpet (ximian product) to install 
the zope on red hat 8 linux .
But we r unable to login, coz, redcarpet takes care of
the complete installation process, including the
choice of uname  pwd.
We have followed the steps in security.txt  the
details in
http://www.zope.org/Documentation/Books/ZopeBook/current/Security.stx
 
HOw ever , we are unable to login. We are also unable
to find either inituser or access file in zope's root
folder.
Plz help us to resolve this.
Thanks
Prasad


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )