<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=IT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>Hi all<br>
I'm trying to build a search form which gets as an input a year and searches <br>
for all objects which have a (custom) date index set within such year. So after
having built a list <br>
of the available years to query on, I added in the search form:<br>
<br>
<select name=" getAnno.query:record:list "<br>
id="getAnno"<br>
tabindex=""<br>
tal:attributes="tabindex tabindex/next;"><br>
<tal:options repeat="year years_list"><br>
<option value="#" tal:define="start_date python:DateTime(int(year),
1, 1);<br>
end_date python:DateTime(int(year), 12, 31);<br>
date_range python:[start_date, end_date];"<br>
tal:attributes="value date_range" tal:content="year">
2000 </option><br>
</tal:options><br>
</select><br>
<br>
<input type="hidden" name=" getAnno.range:record"
value="minmax" /><br>
<br>
(getAnno is my custom date index)<br>
but then I get into the query the string [“DateTime(‘2006/01/01’),
DateTime(‘2006/12/31’)”] instead of the list of dates.<br>
<br>
<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>Actually what I get is a syntaz error, as it is:<o:p></o:p></span></font></p>
<table class=MsoNormalTable border=0 cellpadding=0>
<tr>
<td valign=top style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal align=center style='text-align:center'><b><font size=3
face="Times New Roman"><span style='font-size:12.0pt;font-weight:bold'>getAnno<o:p></o:p></span></font></b></p>
</td>
<td valign=top style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>{'query': ["[DateTime('2005/01/01'),
DateTime('2005/12/31')]"], 'range': 'minmax'}<o:p></o:p></span></font></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'><br>
How do I get the parameter to be a list of dates?<br>
thanks&bye<br>
Lucia<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>