[Zope] Little problem with DTML

Arpad Kiss Arpad Kiss" <sekter@mail.matav.hu
Fri, 5 Feb 1999 16:46:50 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0028_01BE5127.20C8AF70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!--#var "monthvalues[month]"-->  should work, where monthvalues is the =
name list.
But if English names are good for you, than you can store dates as =
floating point numbers in Gadfly and with <!--#var "PrincipiaTime(Gadfly =
datefield)"-->  or <!--#var "ZopeTime(Gadfly datefield)"--> tags you can =
show them. With fmt in #var you can specify different formats.
Otherwise I prefer the floating point representation in Gadfly, it is =
more comfortable for me.
Best regards,
Arpad
    -----Original Message-----
    From: FR Chalaoux <chalaouxf@synbio.tpgnet.net>
    To: zope@zope.org <zope@zope.org>
    Date: Friday, February 05, 1999 12:32 PM
    Subject: Re: [Zope] Little problem with DTML
   =20
   =20
    Hi Arpad, All
   =20
    I also thought to this solution but in my zope application have to =
print the date with the month name not only with the month number =
(ideally).
   =20
    Finally I create a sql method with a 12 selects for each month but =
it is slow :)
   =20
    If I take your solution I should find a way to translate this month =
number in month name. I see to direction :
   =20
    1/ If I can obtain the element i of the propriety list in my folder =
I win. But how select it, as simply in Python, this element?
   =20
    2/ Create a Python class in the Zope Extension Folder with this =
translation capability. I try but had no succes (zope mailing list =
message :[Zope] - Sort date in gadfly/zope - Thu, 28 Jan 1999 17:50:57 =
+0100)
   =20
    What do you thinks about?
    Thanks a lot, FR
   =20
    > Hi,
    > It is not clear for me why you don't use the ORDER BY clause in =
your SQL
    > statement.
    > Of course in this case you have to store month number instead of =
month name
    > in your Gadfly database(to provide the right order).
    > Cheers,
    > Arpad
   =20
   =20
   =20
   =20
    Fran=E7ois-R=E9gis Chalaoux Bioinformatics Group Synth=E9labo =
Biomol=E9culaire 67080 Strasbourg Cedex FRANCE T=E9l : 03 88 60 87 14 =
Fax : 03 88 45 90 70
    _______________________________________________ Zope maillist - =
Zope@zope.org http://www.zope.org/mailman/listinfo/zope


------=_NextPart_000_0028_01BE5127.20C8AF70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><?fontfamily><?param Courier New>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#c0dcc0>
<DIV><FONT size=3D2>&lt;!--#var =
&quot;monthvalues[month]&quot;--&gt;&nbsp; should=20
work, where monthvalues is the name list.</FONT></DIV>
<DIV><FONT size=3D2>But if English names are good for you, than you can =
store=20
dates as floating point numbers in Gadfly and with <FONT =
size=3D2>&lt;!--#var=20
&quot;PrincipiaTime(Gadfly datefield)&quot;--&gt;&nbsp; or <FONT=20
size=3D2>&lt;!--#var &quot;ZopeTime(Gadfly datefield)&quot;--&gt; tags =
you can=20
show them. With fmt in #var you can specify different=20
formats.</FONT></FONT></FONT></DIV>
<DIV><FONT size=3D2>Otherwise I prefer the floating point representation =
in=20
Gadfly, it is more comfortable for me.</FONT></DIV>
<DIV><FONT size=3D2>Best regards,</FONT></DIV>
<DIV><FONT size=3D2>Arpad</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
    <DIV><FONT face=3DArial size=3D2><B>-----Original =
Message-----</B><BR><B>From:=20
    </B>FR Chalaoux &lt;<A=20
    =
href=3D"mailto:chalaouxf@synbio.tpgnet.net">chalaouxf@synbio.tpgnet.net</=
A>&gt;<BR><B>To:=20
    </B><A href=3D"mailto:zope@zope.org">zope@zope.org</A> &lt;<A=20
    href=3D"mailto:zope@zope.org">zope@zope.org</A>&gt;<BR><B>Date: =
</B>Friday,=20
    February 05, 1999 12:32 PM<BR><B>Subject: </B>Re: [Zope] Little =
problem with=20
    DTML<BR><BR></DIV></FONT>Hi Arpad, All<BR><BR>I also thought to this =

    solution but in my zope application have to print the date with the =
month=20
    name not only with the month number (ideally).<BR><BR>Finally I =
create a sql=20
    method with a 12 selects for each month but it is slow :)<BR><BR>If =
I take=20
    your solution I should find a way to translate this month number in =
month=20
    name. I see to direction :<BR><BR>1/ If I can obtain the element i =
of the=20
    propriety list in my folder I win. But how select it, as simply in =
Python,=20
    this element?<BR><BR>2/ Create a Python class in the Zope Extension =
Folder=20
    with this translation capability. I try but had no succes (zope =
mailing list=20
    message :<?color><?param 0000,0000,8000>[Zope] - Sort date in =
gadfly/zope -=20
    Thu, 28 Jan 1999 17:50:57 +0100)<?/color><BR><BR>What do you thinks=20
    about?<BR>Thanks a lot, FR<BR><BR><?color><?param =
0000,0000,0000><?fontfamily><?param Arial>&gt;=20
    Hi,<BR>&gt; It is not clear for me why you don't use the ORDER BY =
clause in=20
    your SQL<BR>&gt; statement.<BR>&gt; Of course in this case you have =
to store=20
    month number instead of month name<BR>&gt; in your Gadfly =
database(to=20
    provide the right order).<BR>&gt; Cheers,<BR>&gt;=20
    Arpad<BR><BR><BR><BR><BR>Fran&ccedil;ois-R&eacute;gis Chalaoux=20
    Bioinformatics Group Synth&eacute;labo Biomol&eacute;culaire 67080=20
    Strasbourg Cedex FRANCE T&eacute;l : 03 88 60 87 14 Fax : 03 88 45 =
90=20
    70<BR>_______________________________________________ Zope maillist =
-=20
    Zope@zope.org=20
http://www.zope.org/mailman/listinfo/zope<BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0028_01BE5127.20C8AF70--