Loading ...
Sorry, an error occurred while loading the content.

[Cheetahtemplate-discuss] RE: [Cheetah template-discuss] Avoid name mapper change thing to thing()

Expand Messages
  • jose@cybergalvez.com
    I ve run into the same problem in the past. The only way that I ve found to fix it is to create a functions which returns the object that I want and thus i
    Message 1 of 1 , May 3, 2006
    View Source
    • 0 Attachment
      I've run into the same problem in the past. The only way that I've
      found to fix it is to create a functions which returns the object that
      I want and thus i avoid the problem.

      Jose
      > -------- Original Message --------
      > Subject: RE: [Cheetahtemplate-discuss] Avoid namemapper change thing to
      > thing()
      > From: "Brian Bird" <brian.bird@...>
      > Date: Wed, May 03, 2006 6:03 am
      > To: "'michelts'" <michelts@...>,
      > <cheetahtemplate-discuss@...>
      >
      > Interesting - I discovered a similar problem recently with Cheetah-2.0rc6.
      > If I used the C compiled version of the name mapper (_namemapper.so on a
      > linux machine, I think it's _namemapper.pyd on windows) I didn't have a
      > problem accessing a class. Using the python NameMapper.py (I think this
      > might be the default on a windows box) it tried to instantiate the class
      > into an object as in your case.
      >
      > Unfortunately, I couldn't come up with a simple example to demonstrate this
      > (I was working in the middle of some large inheritance structure at the
      > time), but in all cases using the C namemapper solved the problem. Assuming
      > you're using Windows it might be worth trying _namemapper.pyd (see
      > http://www.cheetahtemplate.org/download.html) to see if it solves your
      > problem. If it does you may have found an example where the Python
      > NameMapper.py doesn't do the same as the C version.
      >
      > Brian
      >
      >
      >
      > -----Original Message-----
      > From: cheetahtemplate-discuss-admin@...
      > [mailto:cheetahtemplate-discuss-admin@...] On Behalf Of
      > michelts
      > Sent: 03 May 2006 13:33
      > To: cheetahtemplate-discuss@...
      > Subject: [Cheetahtemplate-discuss] Avoid namemapper change thing to thing()
      >
      > Hi guys!
      >
      > I have a template that iterates over a SQLObject select result as above:
      >
      > #for $tipo in $TipoInformativo.select
      > <li><a href="ListaInformativos?tipoID=$tipo.id">Listar
      > $tipo.nome</a></li>
      > #end for
      >
      > The problem is that cheetah tries to change TipoInformativo to
      > TipoInformativo() and I must avoid this because it is instantiating an
      > object, not selecting over the class. Is there a way to do this? I'm using
      > cheetah-1.0...
      >
      > Thanks in advance
      >
      > --
      > Michel Thadeu Sabchuk
      > Curitiba - Brasil
      >
      >
      > -------------------------------------------------------
      > Using Tomcat but need to do more? Need to support web services, security?
      > Get stuff done quickly with pre-integrated technology to make your job
      > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
      > Geronimo
      > http://sel.as-us.falkag.net/sel?cmd=k&kid'0709&bid&3057&dat'1642
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      >
      >
      >
      > -------------------------------------------------------
      > Using Tomcat but need to do more? Need to support web services, security?
      > Get stuff done quickly with pre-integrated technology to make your job easier
      > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      > http://sel.as-us.falkag.net/sel?cmd=lnk&kid'0709&bid&3057&dat'1642
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



      -------------------------------------------------------
      Using Tomcat but need to do more? Need to support web services, security?
      Get stuff done quickly with pre-integrated technology to make your job easier
      Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
      http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.