[Zope] Don't use irritating subject lines like "Please help Urgently" !

Chris Withers chrisw@nipltd.com
Wed Aug 6 12:26:51 EDT 2003


mohammed ismail wrote:

> <form method="get" action="formulator/delobjects"><br>

Your action attribute is somewhat dubious. I'd make it a full URL if I were you...

> <span tal:repeat="id container/objectIds">  
> <INPUT TYPE="checkbox" name="id">

I'd change that name to "ids:list", so you always end up with a REQUEST variable 
called ids that is a list of strings ids of objects to delete.

> <p tal:replace="id"></p><br>
> 
> </span>
> <INPUT TYPE="SUBMIT" name="manage_delObjects"
> VALUE="Delete">
> </form>

Don't give your <input> tag a name like that, it's not clever...

> <div tal:condition="python: request.submit ==
> 'Delete'">
>    <h2><span tal:replace="request/id">Id</span>
> Deleted</h2> 
>    <span tal:condition="python:
> manage_delObjects(request.id)"> Delete </span>
> </div>

This is truly truly evil. This should all be in a python script.
DON'T put logic in ZPT.

> Now when i select the checkbox & click on DELETE
> BUTTON obj1 should get deleted.same thing follows for
> other objects.Please suggest me what changes should i
> make in the above code to get the output.Pleas send me
> the reply as early as possible.

You need to brush up on your list etiquette. You're not paying us (yet ;-) so 
demanding a reply ASAP and using a silly subject line will not get you help.

Suggest you go and read a bit more of the Zope Book on zope.org, have a look at 
a few more examples, and then come back and start asking questions about 
specific problems rather than dumping a load of half formed code in an email and 
expecting others to do your work for you ;-)

Chris





More information about the Zope mailing list