[Zope-dev] Accessing catalog objects

Sebastian Sippl sebastian@proceryon.at
Tue, 23 Jul 2002 12:55:51 +0200


--------------000001000608040403020704
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

On Tuesday 23 Jul 2002 10:20 am, Sebastian Sippl wrote:

>> Hi,
>>
>> I've tried to select all entrys from a catalog by defining the date
>> boundaries(Python script).
>> Looks like this:
>>
>> id=context.getId()
>>
>> return context.cata(
>>          {'content' : id,
>>           'date': [datestart, dateend],
>>           'date_usage' : 'range:min:max',
>>          }
>>         )
>> cata = my catalog,datestart =start date(date-string),dateend=end date
>>
>> When I send my request, the only things I get back are some <MYBRAnI
>> instance at #123848>-tags.
>>
>> For the beginning i would just like to get the ids of the items in the
>> boundaries.
>

RE:If you have id set up as catalog metadata, then those objects will each have 
an id attribute which does what you want.

My question: How do i access the objects ? --> what syntax do i have to use ?

Please help!

Sebastian 





--------------000001000608040403020704
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
<div class="moz-text-plain" wrap="true" graphical-quote="true" style="font-family: courier; font-size: 12px; ">
<pre wrap="">On Tuesday 23 Jul 2002 10:20 am, Sebastian Sippl wrote:
</pre>
<blockquote type="cite">
  <pre wrap=""><span class="moz-txt-citetags">&gt; </span>Hi,
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>I've tried to select all entrys from a catalog by defining the date
<span class="moz-txt-citetags">&gt; </span>boundaries(Python script).
<span class="moz-txt-citetags">&gt; </span>Looks like this:
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>id=context.getId()
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>return context.cata(
<span class="moz-txt-citetags">&gt; </span>         {'content' : id,
<span class="moz-txt-citetags">&gt; </span>          'date': [datestart, dateend],
<span class="moz-txt-citetags">&gt; </span>          'date_usage' : 'range:min:max',
<span class="moz-txt-citetags">&gt; </span>         }
<span class="moz-txt-citetags">&gt; </span>        )
<span class="moz-txt-citetags">&gt; </span>cata = my catalog,datestart =start date(date-string),dateend=end date
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>When I send my request, the only things I get back are some &lt;MYBRAnI
<span class="moz-txt-citetags">&gt; </span>instance at #123848&gt;-tags.
<span class="moz-txt-citetags">&gt;</span>
<span class="moz-txt-citetags">&gt; </span>For the beginning i would just like to get the ids of the items in the
<span class="moz-txt-citetags">&gt; </span>boundaries.
</pre>
  </blockquote>
  <pre wrap=""><!---->
<a class="moz-txt-link-freetext" href="RE:If">RE:If</a> you have id set up as catalog metadata, then those objects will each have 
an id attribute which does what you want.<br><br>My question: How do i access the objects ? --&gt; what syntax do i have to use ?<br><br>Please help!<br><br>Sebastian&nbsp;<br><br><br>

</pre>
  </div>
  </body>
  </html>

--------------000001000608040403020704--