Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

181 строка
9.6 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>doclist — Doclist Module &mdash; Documentation</title>
  7. <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '',
  12. VERSION: '',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/doctools.js"></script>
  20. <link rel="top" title="Documentation" href="index.html" />
  21. <link rel="up" title="Server Side Internals" href="server_side_internals.html" />
  22. <link rel="next" title="doctype — DocType" href="doctype.html" />
  23. <link rel="prev" title="webnotes — Webnotes Module" href="webnotes.html" />
  24. </head>
  25. <body>
  26. <div style="background-color: #FFF; text-align: left; padding: 8px 0px"><img src="_static/banner300910.gif"></div>
  27. <div class="related">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="modindex.html" title="Global Module Index"
  35. accesskey="M">modules</a> |</li>
  36. <li class="right" >
  37. <a href="doctype.html" title="doctype — DocType"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="webnotes.html" title="webnotes — Webnotes Module"
  41. accesskey="P">previous</a> |</li>
  42. <li><a href="index.html">Documentation</a> &raquo;</li>
  43. <li><a href="server_side_api.html" >3. Server Side API</a> &raquo;</li>
  44. <li><a href="server_side_internals.html" accesskey="U">Server Side Internals</a> &raquo;</li>
  45. </ul>
  46. </div>
  47. <div class="sphinxsidebar">
  48. <div class="sphinxsidebarwrapper">
  49. <h3><a href="index.html">Table Of Contents</a></h3>
  50. <ul>
  51. <li><a class="reference external" href=""><tt class="docutils literal"><span class="pre">doclist</span></tt> &#8212; Doclist Module</a><ul>
  52. <li><a class="reference external" href="#functions-for-internal-use">functions for internal use</a></li>
  53. </ul>
  54. </li>
  55. </ul>
  56. <h4>Previous topic</h4>
  57. <p class="topless"><a href="webnotes.html"
  58. title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">webnotes</span></tt> &#8212; Webnotes Module</a></p>
  59. <h4>Next topic</h4>
  60. <p class="topless"><a href="doctype.html"
  61. title="next chapter"><tt class="docutils literal docutils literal"><span class="pre">doctype</span></tt> &#8212; DocType</a></p>
  62. <h3>This Page</h3>
  63. <ul class="this-page-menu">
  64. <li><a href="_sources/doclist.txt"
  65. rel="nofollow">Show Source</a></li>
  66. </ul>
  67. <div id="searchbox" style="display: none">
  68. <h3>Quick search</h3>
  69. <form class="search" action="search.html" method="get">
  70. <input type="text" name="q" size="18" />
  71. <input type="submit" value="Go" />
  72. <input type="hidden" name="check_keywords" value="yes" />
  73. <input type="hidden" name="area" value="default" />
  74. </form>
  75. <p class="searchtip" style="font-size: 90%">
  76. Enter search terms or a module, class or function name.
  77. </p>
  78. </div>
  79. <script type="text/javascript">$('#searchbox').show(0);</script>
  80. </div>
  81. </div>
  82. <div class="document">
  83. <div class="documentwrapper">
  84. <div class="bodywrapper">
  85. <div class="body">
  86. <div class="section" id="module-doclist">
  87. <h1><tt class="xref docutils literal"><span class="pre">doclist</span></tt> &#8212; Doclist Module<a class="headerlink" href="#module-doclist" title="Permalink to this headline">¶</a></h1>
  88. <dl class="function">
  89. <dt id="doclist.getlist">
  90. <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>
  91. <dd><p>Filter a list of records for a specific field from the full doclist</p>
  92. <p>Example:</p>
  93. <div class="highlight-python"><div class="highlight"><pre><span class="c"># find all phone call details</span>
  94. <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">&#39;contact_updates&#39;</span><span class="p">)</span>
  95. <span class="n">pl</span> <span class="o">=</span> <span class="p">[]</span>
  96. <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">dl</span><span class="p">:</span>
  97. <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">&#39;Phone&#39;</span><span class="p">:</span>
  98. <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>
  99. </pre></div>
  100. </div>
  101. </dd></dl>
  102. <dl class="function">
  103. <dt id="doclist.copy">
  104. <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>
  105. <dd>Save &amp; return a copy of the given doclist
  106. Pass fields that are not to be copied in <cite>no_copy</cite></dd></dl>
  107. <dl class="function">
  108. <dt id="doclist.to_html">
  109. <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>
  110. <dd>Return a simple HTML format of the doclist</dd></dl>
  111. <div class="section" id="functions-for-internal-use">
  112. <h2>functions for internal use<a class="headerlink" href="#functions-for-internal-use" title="Permalink to this headline">¶</a></h2>
  113. <dl class="function">
  114. <dt id="doclist.expand">
  115. <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>
  116. <dd>Expand a doclist sent from the client side. (Internally used by the request handler)</dd></dl>
  117. <dl class="function">
  118. <dt id="doclist.compress">
  119. <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>
  120. <dd>Compress a doclist before sending it to the client side. (Internally used by the request handler)</dd></dl>
  121. <dl class="function">
  122. <dt id="doclist.validate_links_doclist">
  123. <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>
  124. <dd>Validate link fields and return link fields that are not correct.
  125. Calls the <cite>validate_links</cite> function on the Document object</dd></dl>
  126. <dl class="function">
  127. <dt id="doclist.getvaluelist">
  128. <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>
  129. <dd>Returns a list of values of a particualr fieldname from all Document object in a doclist</dd></dl>
  130. <dl class="function">
  131. <dt id="doclist.getchildren">
  132. <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>
  133. <dd>Returns the list of all child records of a particular record (used internally)</dd></dl>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="clearer"></div>
  140. </div>
  141. <div class="related">
  142. <h3>Navigation</h3>
  143. <ul>
  144. <li class="right" style="margin-right: 10px">
  145. <a href="genindex.html" title="General Index"
  146. >index</a></li>
  147. <li class="right" >
  148. <a href="modindex.html" title="Global Module Index"
  149. >modules</a> |</li>
  150. <li class="right" >
  151. <a href="doctype.html" title="doctype — DocType"
  152. >next</a> |</li>
  153. <li class="right" >
  154. <a href="webnotes.html" title="webnotes — Webnotes Module"
  155. >previous</a> |</li>
  156. <li><a href="index.html">Documentation</a> &raquo;</li>
  157. <li><a href="server_side_api.html" >3. Server Side API</a> &raquo;</li>
  158. <li><a href="server_side_internals.html" >Server Side Internals</a> &raquo;</li>
  159. </ul>
  160. </div>
  161. <div class="footer">
  162. &copy; Copyright 2010, Rushabh Mehta.
  163. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
  164. </div>
  165. </body>
  166. </html>