You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

846 line
66 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>model Package &mdash; WNFramework v1.8 documentation</title>
  7. <link rel="stylesheet" href="_static/default.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: '1.8',
  13. COLLAPSE_INDEX: 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/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="top" title="WNFramework v1.8 documentation" href="index.html" />
  22. </head>
  23. <body>
  24. <div class="related">
  25. <h3>Navigation</h3>
  26. <ul>
  27. <li class="right" style="margin-right: 10px">
  28. <a href="genindex.html" title="General Index"
  29. accesskey="I">index</a></li>
  30. <li class="right" >
  31. <a href="py-modindex.html" title="Python Module Index"
  32. >modules</a> |</li>
  33. <li><a href="index.html">WNFramework v1.8 documentation</a> &raquo;</li>
  34. </ul>
  35. </div>
  36. <div class="document">
  37. <div class="documentwrapper">
  38. <div class="bodywrapper">
  39. <div class="body">
  40. <div class="section" id="model-package">
  41. <h1>model Package<a class="headerlink" href="#model-package" title="Permalink to this headline">¶</a></h1>
  42. <div class="section" id="id1">
  43. <h2><tt class="xref py py-mod docutils literal"><span class="pre">model</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
  44. <span class="target" id="module-webnotes.model"></span><dl class="function">
  45. <dt id="webnotes.model.check_if_doc_is_linked">
  46. <tt class="descclassname">webnotes.model.</tt><tt class="descname">check_if_doc_is_linked</tt><big>(</big><em>dt</em>, <em>dn</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#check_if_doc_is_linked"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.check_if_doc_is_linked" title="Permalink to this definition">¶</a></dt>
  47. <dd><p>Raises excption if the given doc(dt, dn) is linked in another record.</p>
  48. </dd></dl>
  49. <dl class="function">
  50. <dt id="webnotes.model.clear_recycle_bin">
  51. <tt class="descclassname">webnotes.model.</tt><tt class="descname">clear_recycle_bin</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#clear_recycle_bin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.clear_recycle_bin" title="Permalink to this definition">¶</a></dt>
  52. <dd><p>Clears temporary records that have been deleted</p>
  53. </dd></dl>
  54. <dl class="function">
  55. <dt id="webnotes.model.copytables">
  56. <tt class="descclassname">webnotes.model.</tt><tt class="descname">copytables</tt><big>(</big><em>srctype</em>, <em>src</em>, <em>srcfield</em>, <em>tartype</em>, <em>tar</em>, <em>tarfield</em>, <em>srcfields</em>, <em>tarfields=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#copytables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.copytables" title="Permalink to this definition">¶</a></dt>
  57. <dd></dd></dl>
  58. <dl class="function">
  59. <dt id="webnotes.model.db_exists">
  60. <tt class="descclassname">webnotes.model.</tt><tt class="descname">db_exists</tt><big>(</big><em>dt</em>, <em>dn</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#db_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_exists" title="Permalink to this definition">¶</a></dt>
  61. <dd></dd></dl>
  62. <dl class="function">
  63. <dt id="webnotes.model.delete_doc">
  64. <tt class="descclassname">webnotes.model.</tt><tt class="descname">delete_doc</tt><big>(</big><em>doctype=None</em>, <em>name=None</em>, <em>doclist=None</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#delete_doc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.delete_doc" title="Permalink to this definition">¶</a></dt>
  65. <dd><p>Deletes a doc(dt, dn) and validates if it is not submitted and not linked in a live record</p>
  66. </dd></dl>
  67. <dl class="function">
  68. <dt id="webnotes.model.get_dt_labels">
  69. <tt class="descclassname">webnotes.model.</tt><tt class="descname">get_dt_labels</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#get_dt_labels"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.get_dt_labels" title="Permalink to this definition">¶</a></dt>
  70. <dd></dd></dl>
  71. <dl class="function">
  72. <dt id="webnotes.model.get_link_fields">
  73. <tt class="descclassname">webnotes.model.</tt><tt class="descname">get_link_fields</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#get_link_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.get_link_fields" title="Permalink to this definition">¶</a></dt>
  74. <dd><p>Returns linked fields for dt as a tuple of (linked_doctype, linked_field)</p>
  75. </dd></dl>
  76. <dl class="function">
  77. <dt id="webnotes.model.get_search_criteria">
  78. <tt class="descclassname">webnotes.model.</tt><tt class="descname">get_search_criteria</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#get_search_criteria"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.get_search_criteria" title="Permalink to this definition">¶</a></dt>
  79. <dd></dd></dl>
  80. <dl class="function">
  81. <dt id="webnotes.model.rename">
  82. <tt class="descclassname">webnotes.model.</tt><tt class="descname">rename</tt><big>(</big><em>dt</em>, <em>old</em>, <em>new</em>, <em>is_doctype=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model.html#rename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.rename" title="Permalink to this definition">¶</a></dt>
  83. <dd><p>Renames a doc(dt, old) to doc(dt, new) and updates all linked fields of type &#8220;Link&#8221; or &#8220;Select&#8221; with &#8220;link:&#8221;</p>
  84. </dd></dl>
  85. </div>
  86. <div class="section" id="module-webnotes.model.code">
  87. <span id="code-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">code</span></tt> Module<a class="headerlink" href="#module-webnotes.model.code" title="Permalink to this headline">¶</a></h2>
  88. <p>This is where all the plug-in code is executed. The standard method for DocTypes is declaration of a
  89. standardized <cite>DocType</cite> class that has the methods of any DocType. When an object is instantiated using the
  90. <cite>get_obj</cite> method, it creates an instance of the <cite>DocType</cite> class of that particular DocType and sets the
  91. <cite>doc</cite> and <cite>doclist</cite> attributes that represent the fields (properties) of that record.</p>
  92. <p>methods in following modules are imported for backward compatibility</p>
  93. <blockquote>
  94. <div><ul class="simple">
  95. <li>webnotes.*</li>
  96. <li>webnotes.utils.*</li>
  97. <li>webnotes.model.doc.*</li>
  98. <li>webnotes.model.doclist.*</li>
  99. </ul>
  100. </div></blockquote>
  101. <dl class="function">
  102. <dt id="webnotes.model.code.check_syntax">
  103. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">check_syntax</tt><big>(</big><em>code</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#check_syntax"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.check_syntax" title="Permalink to this definition">¶</a></dt>
  104. <dd></dd></dl>
  105. <dl class="function">
  106. <dt id="webnotes.model.code.execute">
  107. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">execute</tt><big>(</big><em>code</em>, <em>doc=None</em>, <em>doclist=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.execute" title="Permalink to this definition">¶</a></dt>
  108. <dd><p>Execute the code, if doc is given, then return the instance of the <cite>DocType</cite> class created</p>
  109. </dd></dl>
  110. <dl class="function">
  111. <dt id="webnotes.model.code.get_code">
  112. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">get_code</tt><big>(</big><em>module</em>, <em>dt</em>, <em>dn</em>, <em>extn</em>, <em>is_static=None</em>, <em>fieldname=None</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#get_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.get_code" title="Permalink to this definition">¶</a></dt>
  113. <dd></dd></dl>
  114. <dl class="function">
  115. <dt id="webnotes.model.code.get_custom_script">
  116. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">get_custom_script</tt><big>(</big><em>doctype</em>, <em>script_type</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#get_custom_script"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.get_custom_script" title="Permalink to this definition">¶</a></dt>
  117. <dd><p>Returns custom script if set in doctype <cite>Custom Script</cite></p>
  118. </dd></dl>
  119. <dl class="function">
  120. <dt id="webnotes.model.code.get_obj">
  121. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">get_obj</tt><big>(</big><em>dt=None</em>, <em>dn=None</em>, <em>doc=None</em>, <em>doclist=</em><span class="optional">[</span><span class="optional">]</span>, <em>with_children=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#get_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.get_obj" title="Permalink to this definition">¶</a></dt>
  122. <dd><p>Returns the instantiated <cite>DocType</cite> object. Here you can pass the DocType and name (ID) to get the object.
  123. If with_children is true, then all child records will be laoded and added in the doclist.</p>
  124. </dd></dl>
  125. <dl class="function">
  126. <dt id="webnotes.model.code.get_server_obj">
  127. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">get_server_obj</tt><big>(</big><em>doc</em>, <em>doclist=</em><span class="optional">[</span><span class="optional">]</span>, <em>basedoctype=''</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#get_server_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.get_server_obj" title="Permalink to this definition">¶</a></dt>
  128. <dd><p>Returns the instantiated <cite>DocType</cite> object. Will also manage caching &amp; compiling</p>
  129. </dd></dl>
  130. <dl class="function">
  131. <dt id="webnotes.model.code.run_server_obj">
  132. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">run_server_obj</tt><big>(</big><em>server_obj</em>, <em>method_name</em>, <em>arg=None</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#run_server_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.run_server_obj" title="Permalink to this definition">¶</a></dt>
  133. <dd><p>Executes a method (<cite>method_name</cite>) from the given object (<cite>server_obj</cite>)</p>
  134. </dd></dl>
  135. <dl class="function">
  136. <dt id="webnotes.model.code.updatedb">
  137. <tt class="descclassname">webnotes.model.code.</tt><tt class="descname">updatedb</tt><big>(</big><em>doctype</em>, <em>userfields=</em><span class="optional">[</span><span class="optional">]</span>, <em>args={}</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/code.html#updatedb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.code.updatedb" title="Permalink to this definition">¶</a></dt>
  138. <dd></dd></dl>
  139. </div>
  140. <div class="section" id="module-webnotes.model.db_schema">
  141. <span id="db-schema-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">db_schema</span></tt> Module<a class="headerlink" href="#module-webnotes.model.db_schema" title="Permalink to this headline">¶</a></h2>
  142. <p>Syncs a database table to the <cite>DocType</cite> (metadata)</p>
  143. <div class="admonition note">
  144. <p class="first admonition-title">Note</p>
  145. <p class="last">This module is only used internally</p>
  146. </div>
  147. <dl class="class">
  148. <dt id="webnotes.model.db_schema.DbColumn">
  149. <em class="property">class </em><tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">DbColumn</tt><big>(</big><em>table</em>, <em>fieldname</em>, <em>fieldtype</em>, <em>length</em>, <em>default</em>, <em>set_index</em>, <em>options</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbColumn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbColumn" title="Permalink to this definition">¶</a></dt>
  150. <dd><dl class="method">
  151. <dt id="webnotes.model.db_schema.DbColumn.check">
  152. <tt class="descname">check</tt><big>(</big><em>current_def</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbColumn.check"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbColumn.check" title="Permalink to this definition">¶</a></dt>
  153. <dd></dd></dl>
  154. <dl class="method">
  155. <dt id="webnotes.model.db_schema.DbColumn.get_definition">
  156. <tt class="descname">get_definition</tt><big>(</big><em>with_default=1</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbColumn.get_definition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbColumn.get_definition" title="Permalink to this definition">¶</a></dt>
  157. <dd></dd></dl>
  158. </dd></dl>
  159. <dl class="class">
  160. <dt id="webnotes.model.db_schema.DbManager">
  161. <em class="property">class </em><tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">DbManager</tt><big>(</big><em>conn</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager" title="Permalink to this definition">¶</a></dt>
  162. <dd><p>Basically, a wrapper for oft-used mysql commands. like show tables,databases, variables etc...</p>
  163. <dl class="docutils">
  164. <dt>#TODO:</dt>
  165. <dd>0. Simplify / create settings for the restore database source folder
  166. 0a. Merge restore database and extract_sql(from webnotes_server_tools).
  167. 1. Setter and getter for different mysql variables.
  168. 2. Setter and getter for mysql variables at global level??</dd>
  169. </dl>
  170. <dl class="method">
  171. <dt id="webnotes.model.db_schema.DbManager.create_database">
  172. <tt class="descname">create_database</tt><big>(</big><em>target</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.create_database"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.create_database" title="Permalink to this definition">¶</a></dt>
  173. <dd></dd></dl>
  174. <dl class="method">
  175. <dt id="webnotes.model.db_schema.DbManager.create_user">
  176. <tt class="descname">create_user</tt><big>(</big><em>user</em>, <em>password</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.create_user"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.create_user" title="Permalink to this definition">¶</a></dt>
  177. <dd></dd></dl>
  178. <dl class="method">
  179. <dt id="webnotes.model.db_schema.DbManager.delete_user">
  180. <tt class="descname">delete_user</tt><big>(</big><em>target</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.delete_user"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.delete_user" title="Permalink to this definition">¶</a></dt>
  181. <dd></dd></dl>
  182. <dl class="method">
  183. <dt id="webnotes.model.db_schema.DbManager.drop_all_databases">
  184. <tt class="descname">drop_all_databases</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.drop_all_databases"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.drop_all_databases" title="Permalink to this definition">¶</a></dt>
  185. <dd><p>Danger: will delete all databases except test,mysql.</p>
  186. </dd></dl>
  187. <dl class="method">
  188. <dt id="webnotes.model.db_schema.DbManager.drop_database">
  189. <tt class="descname">drop_database</tt><big>(</big><em>target</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.drop_database"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.drop_database" title="Permalink to this definition">¶</a></dt>
  190. <dd></dd></dl>
  191. <dl class="method">
  192. <dt id="webnotes.model.db_schema.DbManager.drop_table">
  193. <tt class="descname">drop_table</tt><big>(</big><em>table_name</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.drop_table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.drop_table" title="Permalink to this definition">¶</a></dt>
  194. <dd></dd></dl>
  195. <dl class="method">
  196. <dt id="webnotes.model.db_schema.DbManager.flush_privileges">
  197. <tt class="descname">flush_privileges</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.flush_privileges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.flush_privileges" title="Permalink to this definition">¶</a></dt>
  198. <dd></dd></dl>
  199. <dl class="method">
  200. <dt id="webnotes.model.db_schema.DbManager.get_database_list">
  201. <tt class="descname">get_database_list</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.get_database_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.get_database_list" title="Permalink to this definition">¶</a></dt>
  202. <dd></dd></dl>
  203. <dl class="method">
  204. <dt id="webnotes.model.db_schema.DbManager.get_table_schema">
  205. <tt class="descname">get_table_schema</tt><big>(</big><em>table</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.get_table_schema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.get_table_schema" title="Permalink to this definition">¶</a></dt>
  206. <dd><p>Just returns the output of Desc tables.</p>
  207. </dd></dl>
  208. <dl class="method">
  209. <dt id="webnotes.model.db_schema.DbManager.get_tables_list">
  210. <tt class="descname">get_tables_list</tt><big>(</big><em>target</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.get_tables_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.get_tables_list" title="Permalink to this definition">¶</a></dt>
  211. <dd></dd></dl>
  212. <dl class="method">
  213. <dt id="webnotes.model.db_schema.DbManager.get_variables">
  214. <tt class="descname">get_variables</tt><big>(</big><em>regex</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.get_variables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.get_variables" title="Permalink to this definition">¶</a></dt>
  215. <dd><p>Get variables that match the passed pattern regex</p>
  216. </dd></dl>
  217. <dl class="method">
  218. <dt id="webnotes.model.db_schema.DbManager.grant_all_privileges">
  219. <tt class="descname">grant_all_privileges</tt><big>(</big><em>target</em>, <em>user</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.grant_all_privileges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.grant_all_privileges" title="Permalink to this definition">¶</a></dt>
  220. <dd></dd></dl>
  221. <dl class="method">
  222. <dt id="webnotes.model.db_schema.DbManager.grant_select_privilges">
  223. <tt class="descname">grant_select_privilges</tt><big>(</big><em>db</em>, <em>table</em>, <em>user</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.grant_select_privilges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.grant_select_privilges" title="Permalink to this definition">¶</a></dt>
  224. <dd></dd></dl>
  225. <dl class="method">
  226. <dt id="webnotes.model.db_schema.DbManager.restore_database">
  227. <tt class="descname">restore_database</tt><big>(</big><em>target</em>, <em>source</em>, <em>root_password</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.restore_database"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.restore_database" title="Permalink to this definition">¶</a></dt>
  228. <dd></dd></dl>
  229. <dl class="method">
  230. <dt id="webnotes.model.db_schema.DbManager.set_transaction_isolation_level">
  231. <tt class="descname">set_transaction_isolation_level</tt><big>(</big><em>scope='SESSION'</em>, <em>level='READ COMMITTED'</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbManager.set_transaction_isolation_level"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbManager.set_transaction_isolation_level" title="Permalink to this definition">¶</a></dt>
  232. <dd></dd></dl>
  233. </dd></dl>
  234. <dl class="class">
  235. <dt id="webnotes.model.db_schema.DbTable">
  236. <em class="property">class </em><tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">DbTable</tt><big>(</big><em>doctype</em>, <em>prefix='tab'</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable" title="Permalink to this definition">¶</a></dt>
  237. <dd><dl class="method">
  238. <dt id="webnotes.model.db_schema.DbTable.alter">
  239. <tt class="descname">alter</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.alter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.alter" title="Permalink to this definition">¶</a></dt>
  240. <dd></dd></dl>
  241. <dl class="method">
  242. <dt id="webnotes.model.db_schema.DbTable.create">
  243. <tt class="descname">create</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.create" title="Permalink to this definition">¶</a></dt>
  244. <dd></dd></dl>
  245. <dl class="method">
  246. <dt id="webnotes.model.db_schema.DbTable.drop_foreign_keys">
  247. <tt class="descname">drop_foreign_keys</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.drop_foreign_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.drop_foreign_keys" title="Permalink to this definition">¶</a></dt>
  248. <dd></dd></dl>
  249. <dl class="method">
  250. <dt id="webnotes.model.db_schema.DbTable.get_column_definitions">
  251. <tt class="descname">get_column_definitions</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.get_column_definitions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.get_column_definitions" title="Permalink to this definition">¶</a></dt>
  252. <dd></dd></dl>
  253. <dl class="method">
  254. <dt id="webnotes.model.db_schema.DbTable.get_columns_from_db">
  255. <tt class="descname">get_columns_from_db</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.get_columns_from_db"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.get_columns_from_db" title="Permalink to this definition">¶</a></dt>
  256. <dd></dd></dl>
  257. <dl class="method">
  258. <dt id="webnotes.model.db_schema.DbTable.get_columns_from_docfields">
  259. <tt class="descname">get_columns_from_docfields</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.get_columns_from_docfields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.get_columns_from_docfields" title="Permalink to this definition">¶</a></dt>
  260. <dd></dd></dl>
  261. <dl class="method">
  262. <dt id="webnotes.model.db_schema.DbTable.get_foreign_keys">
  263. <tt class="descname">get_foreign_keys</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.get_foreign_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.get_foreign_keys" title="Permalink to this definition">¶</a></dt>
  264. <dd></dd></dl>
  265. <dl class="method">
  266. <dt id="webnotes.model.db_schema.DbTable.get_index_definitions">
  267. <tt class="descname">get_index_definitions</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.get_index_definitions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.get_index_definitions" title="Permalink to this definition">¶</a></dt>
  268. <dd></dd></dl>
  269. <dl class="method">
  270. <dt id="webnotes.model.db_schema.DbTable.sync">
  271. <tt class="descname">sync</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#DbTable.sync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.DbTable.sync" title="Permalink to this definition">¶</a></dt>
  272. <dd></dd></dl>
  273. </dd></dl>
  274. <dl class="function">
  275. <dt id="webnotes.model.db_schema.remove_all_foreign_keys">
  276. <tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">remove_all_foreign_keys</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#remove_all_foreign_keys"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.remove_all_foreign_keys" title="Permalink to this definition">¶</a></dt>
  277. <dd></dd></dl>
  278. <dl class="function">
  279. <dt id="webnotes.model.db_schema.updatedb">
  280. <tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">updatedb</tt><big>(</big><em>dt</em>, <em>archive=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#updatedb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.updatedb" title="Permalink to this definition">¶</a></dt>
  281. <dd><dl class="docutils">
  282. <dt>Syncs a <cite>DocType</cite> to the table</dt>
  283. <dd><ul class="first last simple">
  284. <li>creates if required</li>
  285. <li>updates columns</li>
  286. <li>updates indices</li>
  287. </ul>
  288. </dd>
  289. </dl>
  290. </dd></dl>
  291. <dl class="function">
  292. <dt id="webnotes.model.db_schema.validate_column_name">
  293. <tt class="descclassname">webnotes.model.db_schema.</tt><tt class="descname">validate_column_name</tt><big>(</big><em>n</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/db_schema.html#validate_column_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.db_schema.validate_column_name" title="Permalink to this definition">¶</a></dt>
  294. <dd></dd></dl>
  295. </div>
  296. <div class="section" id="module-webnotes.model.doc">
  297. <span id="doc-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">doc</span></tt> Module<a class="headerlink" href="#module-webnotes.model.doc" title="Permalink to this headline">¶</a></h2>
  298. <p>Contains the Document class representing an object / record</p>
  299. <dl class="class">
  300. <dt id="webnotes.model.doc.Document">
  301. <em class="property">class </em><tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">Document</tt><big>(</big><em>doctype=''</em>, <em>name=''</em>, <em>fielddata={}</em>, <em>prefix='tab'</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document" title="Permalink to this definition">¶</a></dt>
  302. <dd><p>The wn(meta-data)framework equivalent of a Database Record.
  303. Stores,Retrieves,Updates the record in the corresponding table.
  304. Runs the triggers required.</p>
  305. <p>The <cite>Document</cite> class represents the basic Object-Relational Mapper (ORM). The object type is defined by
  306. <cite>DocType</cite> and the object ID is represented by <cite>name</cite>:</p>
  307. <div class="highlight-python"><pre>Please note the anamoly in the Web Notes Framework that `ID` is always called as `name`</pre>
  308. </div>
  309. <p>If both <cite>doctype</cite> and <cite>name</cite> are specified in the constructor, then the object is loaded from the database.
  310. If only <cite>doctype</cite> is given, then the object is not loaded
  311. If <cite>fielddata</cite> is specfied, then the object is created from the given dictionary.</p>
  312. <blockquote>
  313. <div><p><strong>Note 1:</strong></p>
  314. <blockquote>
  315. <div><p>The getter and setter of the object are overloaded to map to the fields of the object that
  316. are loaded when it is instantiated.</p>
  317. <p>For example: doc.name will be the <cite>name</cite> field and doc.owner will be the <cite>owner</cite> field</p>
  318. </div></blockquote>
  319. <p><strong>Note 2 - Standard Fields:</strong></p>
  320. <blockquote>
  321. <div><ul class="simple">
  322. <li><cite>name</cite>: ID / primary key</li>
  323. <li><cite>owner</cite>: creator of the record</li>
  324. <li><cite>creation</cite>: datetime of creation</li>
  325. <li><cite>modified</cite>: datetime of last modification</li>
  326. <li><cite>modified_by</cite> : last updating user</li>
  327. <li><cite>docstatus</cite> : Status 0 - Saved, 1 - Submitted, 2- Cancelled</li>
  328. <li><cite>parent</cite> : if child (table) record, this represents the parent record</li>
  329. <li><cite>parenttype</cite> : type of parent record (if any)</li>
  330. <li><cite>parentfield</cite> : table fieldname of parent record (if any)</li>
  331. <li><cite>idx</cite> : Index (sequence) of the child record</li>
  332. </ul>
  333. </div></blockquote>
  334. </div></blockquote>
  335. <dl class="method">
  336. <dt id="webnotes.model.doc.Document.addchild">
  337. <tt class="descname">addchild</tt><big>(</big><em>fieldname</em>, <em>childtype=''</em>, <em>local=0</em>, <em>doclist=None</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.addchild"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.addchild" title="Permalink to this definition">¶</a></dt>
  338. <dd><p>Returns a child record of the give <cite>childtype</cite>.</p>
  339. <ul class="simple">
  340. <li>if local is set, it does not save the record</li>
  341. <li>if doclist is passed, it append the record to the doclist</li>
  342. </ul>
  343. </dd></dl>
  344. <dl class="method">
  345. <dt id="webnotes.model.doc.Document.check_perm">
  346. <tt class="descname">check_perm</tt><big>(</big><em>verbose=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.check_perm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.check_perm" title="Permalink to this definition">¶</a></dt>
  347. <dd></dd></dl>
  348. <dl class="method">
  349. <dt id="webnotes.model.doc.Document.clear_table">
  350. <tt class="descname">clear_table</tt><big>(</big><em>doclist</em>, <em>tablefield</em>, <em>save=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.clear_table"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.clear_table" title="Permalink to this definition">¶</a></dt>
  351. <dd><p>Clears the child records from the given <cite>doclist</cite> for a particular <cite>tablefield</cite></p>
  352. </dd></dl>
  353. <dl class="method">
  354. <dt id="webnotes.model.doc.Document.make_link_list">
  355. <tt class="descname">make_link_list</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.make_link_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.make_link_list" title="Permalink to this definition">¶</a></dt>
  356. <dd></dd></dl>
  357. <dl class="method">
  358. <dt id="webnotes.model.doc.Document.save">
  359. <tt class="descname">save</tt><big>(</big><em>new=0</em>, <em>check_links=1</em>, <em>ignore_fields=0</em>, <em>make_autoname=1</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.save" title="Permalink to this definition">¶</a></dt>
  360. <dd><p>Saves the current record in the database. If new = 1, creates a new instance of the record.
  361. Also clears temperory fields starting with <cite>__</cite></p>
  362. <ul class="simple">
  363. <li>if check_links is set, it validates all <cite>Link</cite> fields</li>
  364. <li>if ignore_fields is sets, it does not throw an exception for any field that does not exist in the
  365. database table</li>
  366. </ul>
  367. </dd></dl>
  368. <dl class="method">
  369. <dt id="webnotes.model.doc.Document.validate_links">
  370. <tt class="descname">validate_links</tt><big>(</big><em>link_list</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#Document.validate_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.Document.validate_links" title="Permalink to this definition">¶</a></dt>
  371. <dd></dd></dl>
  372. </dd></dl>
  373. <dl class="class">
  374. <dt id="webnotes.model.doc.SuperDocType">
  375. <em class="property">class </em><tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">SuperDocType</tt><a class="reference internal" href="_modules/webnotes/model/doc.html#SuperDocType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.SuperDocType" title="Permalink to this definition">¶</a></dt>
  376. <dd></dd></dl>
  377. <dl class="function">
  378. <dt id="webnotes.model.doc.addchild">
  379. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">addchild</tt><big>(</big><em>parent</em>, <em>fieldname</em>, <em>childtype=''</em>, <em>local=0</em>, <em>doclist=None</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#addchild"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.addchild" title="Permalink to this definition">¶</a></dt>
  380. <dd><p>Create a child record to the parent doc.</p>
  381. <p>Example:</p>
  382. <div class="highlight-python"><div class="highlight"><pre><span class="n">c</span> <span class="o">=</span> <span class="n">Document</span><span class="p">(</span><span class="s">&#39;Contact&#39;</span><span class="p">,</span><span class="s">&#39;ABC&#39;</span><span class="p">)</span>
  383. <span class="n">d</span> <span class="o">=</span> <span class="n">addchild</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="s">&#39;contact_updates&#39;</span><span class="p">,</span> <span class="s">&#39;Contact Update&#39;</span><span class="p">,</span> <span class="n">local</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
  384. <span class="n">d</span><span class="o">.</span><span class="n">last_updated</span> <span class="o">=</span> <span class="s">&#39;Phone call&#39;</span>
  385. <span class="n">d</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
  386. </pre></div>
  387. </div>
  388. </dd></dl>
  389. <dl class="function">
  390. <dt id="webnotes.model.doc.check_page_perm">
  391. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">check_page_perm</tt><big>(</big><em>doc</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#check_page_perm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.check_page_perm" title="Permalink to this definition">¶</a></dt>
  392. <dd></dd></dl>
  393. <dl class="function">
  394. <dt id="webnotes.model.doc.get">
  395. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">get</tt><big>(</big><em>dt</em>, <em>dn=''</em>, <em>with_children=1</em>, <em>from_get_obj=0</em>, <em>prefix='tab'</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.get" title="Permalink to this definition">¶</a></dt>
  396. <dd><p>Returns a doclist containing the main record and all child records</p>
  397. </dd></dl>
  398. <dl class="function">
  399. <dt id="webnotes.model.doc.get_report_builder_code">
  400. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">get_report_builder_code</tt><big>(</big><em>doc</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#get_report_builder_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.get_report_builder_code" title="Permalink to this definition">¶</a></dt>
  401. <dd></dd></dl>
  402. <dl class="function">
  403. <dt id="webnotes.model.doc.getchildren">
  404. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">getchildren</tt><big>(</big><em>name</em>, <em>childtype</em>, <em>field=''</em>, <em>parenttype=''</em>, <em>from_doctype=0</em>, <em>prefix='tab'</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#getchildren"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.getchildren" title="Permalink to this definition">¶</a></dt>
  405. <dd></dd></dl>
  406. <dl class="function">
  407. <dt id="webnotes.model.doc.getseries">
  408. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">getseries</tt><big>(</big><em>key</em>, <em>digits</em>, <em>doctype=''</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#getseries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.getseries" title="Permalink to this definition">¶</a></dt>
  409. <dd></dd></dl>
  410. <dl class="function">
  411. <dt id="webnotes.model.doc.make_autoname">
  412. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">make_autoname</tt><big>(</big><em>key</em>, <em>doctype=''</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#make_autoname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.make_autoname" title="Permalink to this definition">¶</a></dt>
  413. <dd><p>Creates an autoname from the given key:</p>
  414. <p><strong>Autoname rules:</strong></p>
  415. <blockquote>
  416. <div><ul>
  417. <li><p class="first">The key is separated by &#8216;.&#8217;</p>
  418. </li>
  419. <li><dl class="first docutils">
  420. <dt>&#8216;####&#8217; represents a series. The string before this part becomes the prefix:</dt>
  421. <dd><p class="first last">Example: ABC.#### creates a series ABC0001, ABC0002 etc</p>
  422. </dd>
  423. </dl>
  424. </li>
  425. <li><p class="first">&#8216;MM&#8217; represents the current month</p>
  426. </li>
  427. <li><p class="first">&#8216;YY&#8217; and &#8216;YYYY&#8217; represent the current year</p>
  428. </li>
  429. </ul>
  430. </div></blockquote>
  431. <p><em>Example:</em></p>
  432. <blockquote>
  433. <div><ul class="simple">
  434. <li>DE/./.YY./.MM./.##### will create a series like
  435. DE/09/01/0001 where 09 is the year, 01 is the month and 0001 is the series</li>
  436. </ul>
  437. </div></blockquote>
  438. </dd></dl>
  439. <dl class="function">
  440. <dt id="webnotes.model.doc.removechild">
  441. <tt class="descclassname">webnotes.model.doc.</tt><tt class="descname">removechild</tt><big>(</big><em>d</em>, <em>is_local=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doc.html#removechild"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doc.removechild" title="Permalink to this definition">¶</a></dt>
  442. <dd><p>Sets the docstatus of the object d to 2 (deleted) and appends an &#8216;old_parent:&#8217; to the parent name</p>
  443. </dd></dl>
  444. </div>
  445. <div class="section" id="module-webnotes.model.doclist">
  446. <span id="doclist-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">doclist</span></tt> Module<a class="headerlink" href="#module-webnotes.model.doclist" title="Permalink to this headline">¶</a></h2>
  447. <dl class="function">
  448. <dt id="webnotes.model.doclist.compress">
  449. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">compress</tt><big>(</big><em>doclist</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#compress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.compress" title="Permalink to this definition">¶</a></dt>
  450. <dd><p>Compress a doclist before sending it to the client side. (Internally used by the request handler)</p>
  451. </dd></dl>
  452. <dl class="function">
  453. <dt id="webnotes.model.doclist.copy_doclist">
  454. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">copy_doclist</tt><big>(</big><em>doclist</em>, <em>no_copy=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#copy_doclist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.copy_doclist" title="Permalink to this definition">¶</a></dt>
  455. <dd><p>Save &amp; return a copy of the given doclist
  456. Pass fields that are not to be copied in <cite>no_copy</cite></p>
  457. </dd></dl>
  458. <dl class="function">
  459. <dt id="webnotes.model.doclist.expand">
  460. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">expand</tt><big>(</big><em>docs</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#expand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.expand" title="Permalink to this definition">¶</a></dt>
  461. <dd><p>Expand a doclist sent from the client side. (Internally used by the request handler)</p>
  462. </dd></dl>
  463. <dl class="function">
  464. <dt id="webnotes.model.doclist.getlist">
  465. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">getlist</tt><big>(</big><em>doclist</em>, <em>field</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#getlist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.getlist" title="Permalink to this definition">¶</a></dt>
  466. <dd><p>Filter a list of records for a specific field from the full doclist</p>
  467. <p>Example:</p>
  468. <div class="highlight-python"><div class="highlight"><pre><span class="c"># find all phone call details </span>
  469. <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>
  470. <span class="n">pl</span> <span class="o">=</span> <span class="p">[]</span>
  471. <span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="n">dl</span><span class="p">:</span>
  472. <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>
  473. <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>
  474. </pre></div>
  475. </div>
  476. </dd></dl>
  477. <dl class="function">
  478. <dt id="webnotes.model.doclist.getvaluelist">
  479. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">getvaluelist</tt><big>(</big><em>doclist</em>, <em>fieldname</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#getvaluelist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.getvaluelist" title="Permalink to this definition">¶</a></dt>
  480. <dd><p>Returns a list of values of a particualr fieldname from all Document object in a doclist</p>
  481. </dd></dl>
  482. <dl class="function">
  483. <dt id="webnotes.model.doclist.to_html">
  484. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">to_html</tt><big>(</big><em>doclist</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#to_html"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.to_html" title="Permalink to this definition">¶</a></dt>
  485. <dd><p>Return a simple HTML format of the doclist</p>
  486. </dd></dl>
  487. <dl class="function">
  488. <dt id="webnotes.model.doclist.validate_links_doclist">
  489. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">validate_links_doclist</tt><big>(</big><em>doclist</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#validate_links_doclist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.validate_links_doclist" title="Permalink to this definition">¶</a></dt>
  490. <dd><p>Validate link fields and return link fields that are not correct.
  491. Calls the <cite>validate_links</cite> function on the Document object</p>
  492. </dd></dl>
  493. <dl class="function">
  494. <dt id="webnotes.model.doclist.xzip">
  495. <tt class="descclassname">webnotes.model.doclist.</tt><tt class="descname">xzip</tt><big>(</big><em>a</em>, <em>b</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doclist.html#xzip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doclist.xzip" title="Permalink to this definition">¶</a></dt>
  496. <dd></dd></dl>
  497. </div>
  498. <div class="section" id="module-webnotes.model.doctype">
  499. <span id="doctype-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">doctype</span></tt> Module<a class="headerlink" href="#module-webnotes.model.doctype" title="Permalink to this headline">¶</a></h2>
  500. <div class="section" id="id2">
  501. <h3>DocType module<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
  502. <p>This module has the DocType class that represents a &#8220;DocType&#8221; as metadata.
  503. This is usually called by the form builder or report builder.</p>
  504. <dl class="docutils">
  505. <dt>Key functions:</dt>
  506. <dd><ul class="first last simple">
  507. <li>manage cache - read / write</li>
  508. <li>merge client-side scripts</li>
  509. <li>update properties from the modules .txt files</li>
  510. </ul>
  511. </dd>
  512. <dt>Cache management:</dt>
  513. <dd><ul class="first last simple">
  514. <li>Cache is stored in __DocTypeCache</li>
  515. </ul>
  516. </dd>
  517. </dl>
  518. <dl class="function">
  519. <dt id="webnotes.model.doctype.clear_cache">
  520. <tt class="descclassname">webnotes.model.doctype.</tt><tt class="descname">clear_cache</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/doctype.html#clear_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doctype.clear_cache" title="Permalink to this definition">¶</a></dt>
  521. <dd></dd></dl>
  522. <dl class="function">
  523. <dt id="webnotes.model.doctype.get">
  524. <tt class="descclassname">webnotes.model.doctype.</tt><tt class="descname">get</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/doctype.html#get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.doctype.get" title="Permalink to this definition">¶</a></dt>
  525. <dd><p>Load &#8220;DocType&#8221; - called by form builder, report buider and from code.py (when there is no cache)</p>
  526. </dd></dl>
  527. </div>
  528. </div>
  529. <div class="section" id="module-webnotes.model.import_docs">
  530. <span id="import-docs-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">import_docs</span></tt> Module<a class="headerlink" href="#module-webnotes.model.import_docs" title="Permalink to this headline">¶</a></h2>
  531. <dl class="class">
  532. <dt id="webnotes.model.import_docs.CSVImport">
  533. <em class="property">class </em><tt class="descclassname">webnotes.model.import_docs.</tt><tt class="descname">CSVImport</tt><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport" title="Permalink to this definition">¶</a></dt>
  534. <dd><dl class="method">
  535. <dt id="webnotes.model.import_docs.CSVImport.check_select_link_data">
  536. <tt class="descname">check_select_link_data</tt><big>(</big><em>r</em>, <em>c</em>, <em>f</em>, <em>d</em>, <em>s=''</em>, <em>l=''</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.check_select_link_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.check_select_link_data" title="Permalink to this definition">¶</a></dt>
  537. <dd></dd></dl>
  538. <dl class="method">
  539. <dt id="webnotes.model.import_docs.CSVImport.convert_csv_data_into_list">
  540. <tt class="descname">convert_csv_data_into_list</tt><big>(</big><em>csv_data</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.convert_csv_data_into_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.convert_csv_data_into_list" title="Permalink to this definition">¶</a></dt>
  541. <dd></dd></dl>
  542. <dl class="method">
  543. <dt id="webnotes.model.import_docs.CSVImport.get_field_type_list">
  544. <tt class="descname">get_field_type_list</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.get_field_type_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.get_field_type_list" title="Permalink to this definition">¶</a></dt>
  545. <dd></dd></dl>
  546. <dl class="method">
  547. <dt id="webnotes.model.import_docs.CSVImport.import_csv">
  548. <tt class="descname">import_csv</tt><big>(</big><em>csv_data</em>, <em>import_date_format='yyyy-mm-dd'</em>, <em>overwrite=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.import_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.import_csv" title="Permalink to this definition">¶</a></dt>
  549. <dd></dd></dl>
  550. <dl class="method">
  551. <dt id="webnotes.model.import_docs.CSVImport.parse_date">
  552. <tt class="descname">parse_date</tt><big>(</big><em>r</em>, <em>c</em>, <em>d</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.parse_date"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.parse_date" title="Permalink to this definition">¶</a></dt>
  553. <dd></dd></dl>
  554. <dl class="method">
  555. <dt id="webnotes.model.import_docs.CSVImport.update_data">
  556. <tt class="descname">update_data</tt><big>(</big><em>fd</em>, <em>row</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.update_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.update_data" title="Permalink to this definition">¶</a></dt>
  557. <dd></dd></dl>
  558. <dl class="method">
  559. <dt id="webnotes.model.import_docs.CSVImport.validate_data">
  560. <tt class="descname">validate_data</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.validate_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.validate_data" title="Permalink to this definition">¶</a></dt>
  561. <dd></dd></dl>
  562. <dl class="method">
  563. <dt id="webnotes.model.import_docs.CSVImport.validate_doctype">
  564. <tt class="descname">validate_doctype</tt><big>(</big><em>dt_list</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.validate_doctype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.validate_doctype" title="Permalink to this definition">¶</a></dt>
  565. <dd></dd></dl>
  566. <dl class="method">
  567. <dt id="webnotes.model.import_docs.CSVImport.validate_fields">
  568. <tt class="descname">validate_fields</tt><big>(</big><em>lb_list</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.validate_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.validate_fields" title="Permalink to this definition">¶</a></dt>
  569. <dd></dd></dl>
  570. <dl class="method">
  571. <dt id="webnotes.model.import_docs.CSVImport.validate_headers">
  572. <tt class="descname">validate_headers</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#CSVImport.validate_headers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.CSVImport.validate_headers" title="Permalink to this definition">¶</a></dt>
  573. <dd></dd></dl>
  574. </dd></dl>
  575. <dl class="function">
  576. <dt id="webnotes.model.import_docs.get_template">
  577. <tt class="descclassname">webnotes.model.import_docs.</tt><tt class="descname">get_template</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#get_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.get_template" title="Permalink to this definition">¶</a></dt>
  578. <dd></dd></dl>
  579. <dl class="function">
  580. <dt id="webnotes.model.import_docs.import_docs">
  581. <tt class="descclassname">webnotes.model.import_docs.</tt><tt class="descname">import_docs</tt><big>(</big><em>docs=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/webnotes/model/import_docs.html#import_docs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.import_docs.import_docs" title="Permalink to this definition">¶</a></dt>
  582. <dd></dd></dl>
  583. </div>
  584. <div class="section" id="module-webnotes.model.meta">
  585. <span id="meta-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">meta</span></tt> Module<a class="headerlink" href="#module-webnotes.model.meta" title="Permalink to this headline">¶</a></h2>
  586. <dl class="function">
  587. <dt id="webnotes.model.meta.get_dt_values">
  588. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_dt_values</tt><big>(</big><em>doctype</em>, <em>fields</em>, <em>as_dict=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_dt_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_dt_values" title="Permalink to this definition">¶</a></dt>
  589. <dd></dd></dl>
  590. <dl class="function">
  591. <dt id="webnotes.model.meta.get_link_fields">
  592. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_link_fields</tt><big>(</big><em>doctype</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_link_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_link_fields" title="Permalink to this definition">¶</a></dt>
  593. <dd></dd></dl>
  594. <dl class="function">
  595. <dt id="webnotes.model.meta.get_parent_dt">
  596. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_parent_dt</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_parent_dt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_parent_dt" title="Permalink to this definition">¶</a></dt>
  597. <dd></dd></dl>
  598. <dl class="function">
  599. <dt id="webnotes.model.meta.get_print_format_html">
  600. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_print_format_html</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_print_format_html"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_print_format_html" title="Permalink to this definition">¶</a></dt>
  601. <dd></dd></dl>
  602. <dl class="function">
  603. <dt id="webnotes.model.meta.get_search_criteria">
  604. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_search_criteria</tt><big>(</big><em>dt</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_search_criteria"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_search_criteria" title="Permalink to this definition">¶</a></dt>
  605. <dd></dd></dl>
  606. <dl class="function">
  607. <dt id="webnotes.model.meta.get_table_fields">
  608. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">get_table_fields</tt><big>(</big><em>doctype</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#get_table_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.get_table_fields" title="Permalink to this definition">¶</a></dt>
  609. <dd></dd></dl>
  610. <dl class="function">
  611. <dt id="webnotes.model.meta.is_single">
  612. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">is_single</tt><big>(</big><em>doctype</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#is_single"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.is_single" title="Permalink to this definition">¶</a></dt>
  613. <dd></dd></dl>
  614. <dl class="function">
  615. <dt id="webnotes.model.meta.set_dt_value">
  616. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">set_dt_value</tt><big>(</big><em>doctype</em>, <em>field</em>, <em>value</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#set_dt_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.set_dt_value" title="Permalink to this definition">¶</a></dt>
  617. <dd></dd></dl>
  618. <dl class="function">
  619. <dt id="webnotes.model.meta.set_fieldname">
  620. <tt class="descclassname">webnotes.model.meta.</tt><tt class="descname">set_fieldname</tt><big>(</big><em>field_id</em>, <em>fieldname</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/meta.html#set_fieldname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.meta.set_fieldname" title="Permalink to this definition">¶</a></dt>
  621. <dd></dd></dl>
  622. </div>
  623. <div class="section" id="module-webnotes.model.modules">
  624. <span id="modules-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">modules</span></tt> Module<a class="headerlink" href="#module-webnotes.model.modules" title="Permalink to this headline">¶</a></h2>
  625. <dl class="function">
  626. <dt id="webnotes.model.modules.get_module_items">
  627. <tt class="descclassname">webnotes.model.modules.</tt><tt class="descname">get_module_items</tt><big>(</big><em>mod</em>, <em>only_dt=0</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/modules.html#get_module_items"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.modules.get_module_items" title="Permalink to this definition">¶</a></dt>
  628. <dd></dd></dl>
  629. </div>
  630. <div class="section" id="module-webnotes.model.triggers">
  631. <span id="triggers-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">triggers</span></tt> Module<a class="headerlink" href="#module-webnotes.model.triggers" title="Permalink to this headline">¶</a></h2>
  632. <p>Add, manage, fire triggers (events / observers)
  633. Standard events called by the framework are &#8220;save, submit, cancel&#8221;</p>
  634. <dl class="function">
  635. <dt id="webnotes.model.triggers.add_trigger">
  636. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">add_trigger</tt><big>(</big><em>doctype</em>, <em>docname</em>, <em>event_name</em>, <em>method</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#add_trigger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.add_trigger" title="Permalink to this definition">¶</a></dt>
  637. <dd><p>Add a trigger to an event on a doctype, docname. The specified method will be called.
  638. Wild card &#8216;*&#8217; is allowed in doctype, docname and/or event_name</p>
  639. </dd></dl>
  640. <dl class="function">
  641. <dt id="webnotes.model.triggers.fire_event">
  642. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">fire_event</tt><big>(</big><em>doc</em>, <em>event_name</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#fire_event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.fire_event" title="Permalink to this definition">¶</a></dt>
  643. <dd><p>Fire all triggers on an event and passes the doc to the trigger</p>
  644. </dd></dl>
  645. <dl class="function">
  646. <dt id="webnotes.model.triggers.insert_trigger">
  647. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">insert_trigger</tt><big>(</big><em>doctype</em>, <em>docname</em>, <em>event_name</em>, <em>method</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#insert_trigger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.insert_trigger" title="Permalink to this definition">¶</a></dt>
  648. <dd><p>inserts a new trigger record</p>
  649. </dd></dl>
  650. <dl class="function">
  651. <dt id="webnotes.model.triggers.remove_trigger">
  652. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">remove_trigger</tt><big>(</big><em>doctype</em>, <em>docname</em>, <em>event_name</em>, <em>method</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#remove_trigger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.remove_trigger" title="Permalink to this definition">¶</a></dt>
  653. <dd><p>Remove a trigger on an event</p>
  654. </dd></dl>
  655. <dl class="function">
  656. <dt id="webnotes.model.triggers.setup">
  657. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">setup</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#setup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.setup" title="Permalink to this definition">¶</a></dt>
  658. <dd><p>creates the DocTrigger table from core</p>
  659. </dd></dl>
  660. <dl class="function">
  661. <dt id="webnotes.model.triggers.trigger_exists">
  662. <tt class="descclassname">webnotes.model.triggers.</tt><tt class="descname">trigger_exists</tt><big>(</big><em>doctype</em>, <em>docname</em>, <em>event_name</em>, <em>method</em><big>)</big><a class="reference internal" href="_modules/webnotes/model/triggers.html#trigger_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#webnotes.model.triggers.trigger_exists" title="Permalink to this definition">¶</a></dt>
  663. <dd><p>returns true if trigger exists</p>
  664. </dd></dl>
  665. </div>
  666. </div>
  667. </div>
  668. </div>
  669. </div>
  670. <div class="sphinxsidebar">
  671. <div class="sphinxsidebarwrapper">
  672. <p class="logo"><a href="index.html">
  673. <img class="logo" src="_static/wnflogo200.gif" alt="Logo"/>
  674. </a></p>
  675. <h3><a href="index.html">Table Of Contents</a></h3>
  676. <ul>
  677. <li><a class="reference internal" href="#">model Package</a><ul>
  678. <li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">model</span></tt> Package</a></li>
  679. <li><a class="reference internal" href="#module-webnotes.model.code"><tt class="docutils literal"><span class="pre">code</span></tt> Module</a></li>
  680. <li><a class="reference internal" href="#module-webnotes.model.db_schema"><tt class="docutils literal"><span class="pre">db_schema</span></tt> Module</a></li>
  681. <li><a class="reference internal" href="#module-webnotes.model.doc"><tt class="docutils literal"><span class="pre">doc</span></tt> Module</a></li>
  682. <li><a class="reference internal" href="#module-webnotes.model.doclist"><tt class="docutils literal"><span class="pre">doclist</span></tt> Module</a></li>
  683. <li><a class="reference internal" href="#module-webnotes.model.doctype"><tt class="docutils literal"><span class="pre">doctype</span></tt> Module</a><ul>
  684. <li><a class="reference internal" href="#id2">DocType module</a></li>
  685. </ul>
  686. </li>
  687. <li><a class="reference internal" href="#module-webnotes.model.import_docs"><tt class="docutils literal"><span class="pre">import_docs</span></tt> Module</a></li>
  688. <li><a class="reference internal" href="#module-webnotes.model.meta"><tt class="docutils literal"><span class="pre">meta</span></tt> Module</a></li>
  689. <li><a class="reference internal" href="#module-webnotes.model.modules"><tt class="docutils literal"><span class="pre">modules</span></tt> Module</a></li>
  690. <li><a class="reference internal" href="#module-webnotes.model.triggers"><tt class="docutils literal"><span class="pre">triggers</span></tt> Module</a></li>
  691. </ul>
  692. </li>
  693. </ul>
  694. <h3>This Page</h3>
  695. <ul class="this-page-menu">
  696. <li><a href="_sources/webnotes.model.txt"
  697. rel="nofollow">Show Source</a></li>
  698. </ul>
  699. <div id="searchbox" style="display: none">
  700. <h3>Quick search</h3>
  701. <form class="search" action="search.html" method="get">
  702. <input type="text" name="q" size="18" />
  703. <input type="submit" value="Go" />
  704. <input type="hidden" name="check_keywords" value="yes" />
  705. <input type="hidden" name="area" value="default" />
  706. </form>
  707. <p class="searchtip" style="font-size: 90%">
  708. Enter search terms or a module, class or function name.
  709. </p>
  710. </div>
  711. <script type="text/javascript">$('#searchbox').show(0);</script>
  712. </div>
  713. </div>
  714. <div class="clearer"></div>
  715. </div>
  716. <div class="related">
  717. <h3>Navigation</h3>
  718. <ul>
  719. <li class="right" style="margin-right: 10px">
  720. <a href="genindex.html" title="General Index"
  721. >index</a></li>
  722. <li class="right" >
  723. <a href="py-modindex.html" title="Python Module Index"
  724. >modules</a> |</li>
  725. <li><a href="index.html">WNFramework v1.8 documentation</a> &raquo;</li>
  726. </ul>
  727. </div>
  728. <div class="footer">
  729. &copy; Copyright 2011, Rushabh Mehta, Web Notes Technologies.
  730. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
  731. </div>
  732. </body>
  733. </html>