Hi guys!

A time ago I was here asking about acquisition, I think on a couple of
possibilities, I ned a way to have the same content with another
design... The application will be developed under layers, could be
something like the follow:

Base.py
  title='class attribute "title"'
  writeHTML()
    writeMenu()
    writeBody()

Each page should replace writeBody and even writeMenu, can replace
another methods like awake, and can replace class attributes like
title...

The problem was how to mix a SpecificPage with a TemplatePage, I use
"dir()" to do this task. I do dir(SpecificPage) and intersect it to its
Base (SpecificPage.__bases__[0]), I do the comparison testing if the
method on the SpecificPage is not the same on the
SpecificPage.__bases__[0]. After that I know all method defined on
SpecificPage, suppose:

SpecificPage(SomeTemplate):
  def abc(...):
    ...
  attr1='fdsafds'

I know that SpecificPage (re)defines the abc and attr1 methods. To have
another page with all methods from Another Template, but having the abc
and attr1 from SpecificPage, I can create the class as:

NewPage(AnotherTemplate, SpecificPage):
  def abc(...):
    SpecificPage.abc(...)
  attr1=SpecificPage.attr1

I make a function to do it dinamically. I think it will solve my
problem, but I have another one. I make a ServletFactory that
interprets ".acq" files, the file content is something like:

#---
Template=Design
Base=/home/Projects/SomeProject/BasePage
#---

This way, with this 2 lines I specifie the Template I will use and the
Base, then the page will be dinamically generated. But this is waste of
work. I will use all pages from a Module, suppose:

Module1 - 
  Page1.py
  Page2.py
  Page3.py

The actual way I need to write a Page1.acq, Page2.acq, Page3.acq, but
could I have a way to always use the (Page1.py | Page2.py | Page3.py)
with a specific design? Is there a way to catch the request and send
the proper result even without having the requested file in the
context?

Sorry my too large message, and sorry my poor english, if someone be
interested with the work I done, I can write a better message...

thanks for any help...

=====
--
Michel Thadeu Sabchuk
Curitiba/PR


        
        
                
_______________________________________________________
Yahoo! Acesso Gr�tis - navegue de gra�a com conex�o de qualidade! 
http://br.acesso.yahoo.com/


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to