Zope uses custom HTML tags in a document to perform python tasks (instead 
of {{}} like Web2py, it uses <dtml-... > that is analyzed and values 
replaced)

I debugged through how Web2Py processes templates, and this leaves all html 
untouched (even if incorrect). The other problem is that Zope does not have 
a "function tree" like web2py where there is a function to match the page, 
they have a html file that corresponds. So there is way more work if this 
were possible.

I think I have more research to decide if this will be viable (not looking 
good right now)

For example (very simple) the root index.html code:

<dtml-if "REQUEST.has_key('nav_idn')">
<dtml-call "RESPONSE.redirect(URL1+'/Main?nav_idn='+nav_idn)">
<dtml-else>
<dtml-call "RESPONSE.redirect(URL1+'/Main')">
</dtml-if>


So in a .../controllers/default.py, an entry index() needs to be created to 
represent this entry. Then either the code has to be manually converted to 
python, or a parser needs to convert the dtml to python with Web2Py tags, 

def index():
    if request.post_vars.has_key('nav_idn'):
        redirect(URL1+'/Main?nav_idn='+nav_idn)
    else:
        redirect(URL1+'/Main')   # I know we do not need two calls to the 
same function that differ by a parameter...


There is no real HTML in this example, and the real first goal would be to 
reuse/recover the existing HTML scraped from the DTML... Then implement 
logic for any objects the DTML calls.

So maybe this is a severely optimistic idea, maybe more of a mind 
experiment...

Thanks

Floyd 



On Thursday, December 4, 2014 1:57:22 PM UTC-5, Anthony wrote:
>
> What do you mean by "hook into the process so I can convert the tags 
> real-time"? What exactly are you proposing to do? Can you show some sample 
> code?
>
> On Thursday, December 4, 2014 10:03:35 AM UTC-5, [email protected] wrote:
>>
>> I have an antique Zope app that I would like to "Try" to convert to 
>> Web2py. I would like to add the custom zope <dtml-... tags and hook into 
>> the process so I can convert the tags real-time.
>>
>> Just looking to see if anyone has extended the processing or has 
>> suggestions (other than "you are nuts")
>>
>> Thanks
>>
>> Floyd
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to