[Zope] Little problem with DTML

FR Chalaoux chalaouxf@synbio.tpgnet.net
Thu, 4 Feb 1999 20:27:06 +0100


Hi All,

I spend a long day trying to play with DTML and SQL method. 
Thus, I decided to ask to experts :)
My problem is to print the result of a an SQL method "call" only if a 
condition is realized.
 
I readed many thing on documentation but even sqltest, sqlgroup, 
insert DTML in sql method, gave me not a solution. I admit also 
that these new notions are a bit new for me but more exemple 
should also help me.

I have a properties(monthvalue : January, February, ....) that I want 
to test against a value of a column  of the resulting sql method 
(view_star_mois). If the record contents a column with the 
sequence-item then I print the record. This is the only solution I 
found to order by month my records in a gadfly database :)

==========================
Document template
==========================

<!--#in monthvalue-->
  <!--#in view_star_month-->
    <!--#if "month == _vars['sequence-item']"-->
      <!--#var starname--> <!--#var month--> <!--#var year--> <!--#var 
position--> 
    <!--#/if-->
  <!--#/in-->
<!--#/in-->


===========================
SQL method : view_star_month
===========================
select * from star


Question 1
==========
This algorithm is not very efficient cause I have to call an sql 
method for each sequence-item. Is there
an other solution?

Question 2
==========
The previous DTML sequence creates an empty html file. Why, 
cause my records database contents these months?

Question 3
==========
Internationalization is not yet there for the date in Zope. Do you 
think with Python 1.2 this should come?


Help please, FR.


François-Régis Chalaoux
Bioinformatics Group
Synthélabo Biomoléculaire
67080 Strasbourg Cedex
FRANCE
Tél : 03 88 60 87 14
Fax : 03 88 45 90 70