|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>doclist — Doclist Module — Documentation</title>
- <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '',
- VERSION: '',
- COLLAPSE_MODINDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Documentation" href="index.html" />
- <link rel="up" title="Server Side Internals" href="server_side_internals.html" />
- <link rel="next" title="doctype — DocType" href="doctype.html" />
- <link rel="prev" title="webnotes — Webnotes Module" href="webnotes.html" />
- </head>
- <body>
- <div style="background-color: #FFF; text-align: left; padding: 8px 0px"><img src="_static/banner300910.gif"></div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="modindex.html" title="Global Module Index"
- accesskey="M">modules</a> |</li>
- <li class="right" >
- <a href="doctype.html" title="doctype — DocType"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="webnotes.html" title="webnotes — Webnotes Module"
- accesskey="P">previous</a> |</li>
- <li><a href="index.html">Documentation</a> »</li>
- <li><a href="server_side_api.html" >3. Server Side API</a> »</li>
- <li><a href="server_side_internals.html" accesskey="U">Server Side Internals</a> »</li>
- </ul>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h3><a href="index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference external" href=""><tt class="docutils literal"><span class="pre">doclist</span></tt> — Doclist Module</a><ul>
- <li><a class="reference external" href="#functions-for-internal-use">functions for internal use</a></li>
- </ul>
- </li>
- </ul>
-
- <h4>Previous topic</h4>
- <p class="topless"><a href="webnotes.html"
- title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">webnotes</span></tt> — Webnotes Module</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="doctype.html"
- title="next chapter"><tt class="docutils literal docutils literal"><span class="pre">doctype</span></tt> — DocType</a></p>
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="_sources/doclist.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- <div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" size="18" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
-
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="module-doclist">
- <h1><tt class="xref docutils literal"><span class="pre">doclist</span></tt> — Doclist Module<a class="headerlink" href="#module-doclist" title="Permalink to this headline">¶</a></h1>
- <dl class="function">
- <dt id="doclist.getlist">
- <tt class="descclassname">doclist.</tt><tt class="descname">getlist</tt><big>(</big><em>doclist</em>, <em>field</em><big>)</big><a class="headerlink" href="#doclist.getlist" title="Permalink to this definition">¶</a></dt>
- <dd><p>Filter a list of records for a specific field from the full doclist</p>
- <p>Example:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="c"># find all phone call details</span>
- <span class="n">dl</span> <span class="o">=</span> <span class="n">getlist</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">doclist</span><span class="p">,</span> <span class="s">'contact_updates'</span><span class="p">)</span>
- <span class="n">pl</span> <span class="o">=</span> <span class="p">[]</span>
- <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">dl</span><span class="p">:</span>
- <span class="k">if</span> <span class="n">d</span><span class="o">.</span><span class="n">type</span><span class="o">==</span><span class="s">'Phone'</span><span class="p">:</span>
- <span class="n">pl</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
- </pre></div>
- </div>
- </dd></dl>
-
- <dl class="function">
- <dt id="doclist.copy">
- <tt class="descclassname">doclist.</tt><tt class="descname">copy</tt><big>(</big><em>doclist</em>, <em>no_copy =</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#doclist.copy" title="Permalink to this definition">¶</a></dt>
- <dd>Save & return a copy of the given doclist
- Pass fields that are not to be copied in <cite>no_copy</cite></dd></dl>
-
- <dl class="function">
- <dt id="doclist.to_html">
- <tt class="descclassname">doclist.</tt><tt class="descname">to_html</tt><big>(</big><em>doclist</em><big>)</big><a class="headerlink" href="#doclist.to_html" title="Permalink to this definition">¶</a></dt>
- <dd>Return a simple HTML format of the doclist</dd></dl>
-
- <div class="section" id="functions-for-internal-use">
- <h2>functions for internal use<a class="headerlink" href="#functions-for-internal-use" title="Permalink to this headline">¶</a></h2>
- <dl class="function">
- <dt id="doclist.expand">
- <tt class="descclassname">doclist.</tt><tt class="descname">expand</tt><big>(</big><em>docs</em><big>)</big><a class="headerlink" href="#doclist.expand" title="Permalink to this definition">¶</a></dt>
- <dd>Expand a doclist sent from the client side. (Internally used by the request handler)</dd></dl>
-
- <dl class="function">
- <dt id="doclist.compress">
- <tt class="descclassname">doclist.</tt><tt class="descname">compress</tt><big>(</big><em>doclist</em><big>)</big><a class="headerlink" href="#doclist.compress" title="Permalink to this definition">¶</a></dt>
- <dd>Compress a doclist before sending it to the client side. (Internally used by the request handler)</dd></dl>
-
- <dl class="function">
- <dt id="doclist.validate_links_doclist">
- <tt class="descclassname">doclist.</tt><tt class="descname">validate_links_doclist</tt><big>(</big><em>doclist</em><big>)</big><a class="headerlink" href="#doclist.validate_links_doclist" title="Permalink to this definition">¶</a></dt>
- <dd>Validate link fields and return link fields that are not correct.
- Calls the <cite>validate_links</cite> function on the Document object</dd></dl>
-
- <dl class="function">
- <dt id="doclist.getvaluelist">
- <tt class="descclassname">doclist.</tt><tt class="descname">getvaluelist</tt><big>(</big><em>doclist</em>, <em>fieldname</em><big>)</big><a class="headerlink" href="#doclist.getvaluelist" title="Permalink to this definition">¶</a></dt>
- <dd>Returns a list of values of a particualr fieldname from all Document object in a doclist</dd></dl>
-
- <dl class="function">
- <dt id="doclist.getchildren">
- <tt class="descclassname">doclist.</tt><tt class="descname">getchildren</tt><big>(</big><em>name</em>, <em>childtype</em>, <em>field=''</em>, <em>parenttype=''</em><big>)</big><a class="headerlink" href="#doclist.getchildren" title="Permalink to this definition">¶</a></dt>
- <dd>Returns the list of all child records of a particular record (used internally)</dd></dl>
-
- </div>
- </div>
-
-
- </div>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="modindex.html" title="Global Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="doctype.html" title="doctype — DocType"
- >next</a> |</li>
- <li class="right" >
- <a href="webnotes.html" title="webnotes — Webnotes Module"
- >previous</a> |</li>
- <li><a href="index.html">Documentation</a> »</li>
- <li><a href="server_side_api.html" >3. Server Side API</a> »</li>
- <li><a href="server_side_internals.html" >Server Side Internals</a> »</li>
- </ul>
- </div>
- <div class="footer">
- © Copyright 2010, Rushabh Mehta.
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
- </div>
- </body>
- </html>
|