Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 6f61f4fc58119d17ef9d99939eb417b3 > files > 817

python-django-horizon-doc-2012.2.3-1.fc18.noarch.rpm


<!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>The horizon.tables.base Module &mdash; Horizon 2012.2.3 documentation</title>
    
    <link rel="stylesheet" href="../../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/tweaks.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '2012.2.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/jquery.tweet.js"></script>
    <link rel="top" title="Horizon 2012.2.3 documentation" href="../../index.html" />
    <link rel="up" title="Source Code Index" href="../autoindex.html" />
    <link rel="next" title="The horizon.tables Module" href="horizon.tables.html" />
    <link rel="prev" title="The horizon.tables.actions Module" href="horizon.tables.actions.html" /> 
  </head>
  <body>
  <div id="header">
    <h1 id="logo"><a href="http://www.openstack.org/">OpenStack</a></h1>
    <ul id="navigation">
      <li><a href="http://www.openstack.org/" title="Go to the Home page" class="link">Home</a></li>
      <li><a href="http://www.openstack.org/projects/" title="Go to the OpenStack Projects page">Projects</a></li>
      <li><a href="http://www.openstack.org/user-stories/" title="Go to the User Stories page" class="link">User Stories</a></li>
      <li><a href="http://www.openstack.org/community/" title="Go to the Community page" class="link">Community</a></li>
      <li><a href="http://www.openstack.org/blog/" title="Go to the OpenStack Blog">Blog</a></li>
      <li><a href="http://wiki.openstack.org/" title="Go to the OpenStack Wiki">Wiki</a></li>
      <li><a href="http://docs.openstack.org/" title="Go to OpenStack Documentation" class="current">Documentation</a></li>
    </ul>
  </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="the-horizon-tables-base-module">
<h1>The <tt class="xref py py-mod docutils literal"><span class="pre">horizon.tables.base</span></tt> Module<a class="headerlink" href="#the-horizon-tables-base-module" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">Cell</tt><big>(</big><em>datum</em>, <em>data</em>, <em>column</em>, <em>row</em>, <em>attrs=None</em>, <em>classes=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.utils.html.HTMLElement</span></tt></p>
<p>Represents a single cell in the table.</p>
<dl class="method">
<dt>
<tt class="descclassname">Cell.</tt><tt class="descname">get_default_classes</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell.get_default_classes"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a flattened string of the cell&#8217;s CSS classes.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Cell.</tt><tt class="descname">get_status_class</tt><big>(</big><em>status</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell.get_status_class"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a css class name determined by the status value.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Cell.</tt><tt class="descname">status</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell.status"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Gets the status for the column based on the cell&#8217;s data.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Cell.</tt><tt class="descname">url</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell.url"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Cell.</tt><tt class="descname">value</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#Cell.value"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a formatted version of the data for final output.</p>
<p>This takes into consideration the
<tt class="xref py py-attr docutils literal"><span class="pre">link`</span></tt> and
<a class="reference internal" href="../../ref/tables.html#horizon.tables.Column.empty_value" title="horizon.tables.Column.empty_value"><tt class="xref py py-attr docutils literal"><span class="pre">empty_value</span></tt></a>
attributes.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">Column</tt><big>(</big><em>transform</em>, <em>verbose_name=None</em>, <em>sortable=True</em>, <em>link=None</em>, <em>allowed_data_types=</em><span class="optional">[</span><span class="optional">]</span>, <em>hidden=False</em>, <em>attrs=None</em>, <em>status=False</em>, <em>status_choices=None</em>, <em>display_choices=None</em>, <em>empty_value=None</em>, <em>filters=None</em>, <em>classes=None</em>, <em>summation=None</em>, <em>auto=None</em>, <em>truncate=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Column"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.utils.html.HTMLElement</span></tt></p>
<p>A class which represents a single column in a <a class="reference internal" href="../../ref/tables.html#horizon.tables.DataTable" title="horizon.tables.DataTable"><tt class="xref py py-class docutils literal"><span class="pre">DataTable</span></tt></a>.</p>
<dl class="attribute">
<dt id="horizon.tables.base.transform">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">transform</tt><a class="headerlink" href="#horizon.tables.base.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>A string or callable. If <tt class="docutils literal"><span class="pre">transform</span></tt> is a string, it should be the
name of the attribute on the underlying data class which
should be displayed in this column. If it is a callable, it
will be passed the current row&#8217;s data at render-time and should
return the contents of the cell. Required.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.verbose_name">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">verbose_name</tt><a class="headerlink" href="#horizon.tables.base.verbose_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name for this column which should be used for display purposes.
Defaults to the value of <tt class="docutils literal"><span class="pre">transform</span></tt> with the first letter
of each word capitalized.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.sortable">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">sortable</tt><a class="headerlink" href="#horizon.tables.base.sortable" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean to determine whether this column should be sortable or not.
Defaults to <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.hidden">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">hidden</tt><a class="headerlink" href="#horizon.tables.base.hidden" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean to determine whether or not this column should be displayed
when rendering the table. Default: <tt class="docutils literal"><span class="pre">False</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.link">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">link</tt><a class="headerlink" href="#horizon.tables.base.link" title="Permalink to this definition">¶</a></dt>
<dd><p>A string or callable which returns a URL which will be wrapped around
this column&#8217;s text as a link.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.allowed_data_types">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">allowed_data_types</tt><a class="headerlink" href="#horizon.tables.base.allowed_data_types" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of data types for which the link should be created.
Default is an empty list (<tt class="docutils literal"><span class="pre">[]</span></tt>).</p>
<p>When the list is empty and the <tt class="docutils literal"><span class="pre">link</span></tt> attribute is not None, all the
rows under this column will be links.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.status">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">status</tt><a class="headerlink" href="#horizon.tables.base.status" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean designating whether or not this column represents a status
(i.e. &#8220;enabled/disabled&#8221;, &#8220;up/down&#8221;, &#8220;active/inactive&#8221;).
Default: <tt class="docutils literal"><span class="pre">False</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.status_choices">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">status_choices</tt><a class="headerlink" href="#horizon.tables.base.status_choices" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple of tuples representing the possible data values for the
status column and their associated boolean equivalent. Positive
states should equate to <tt class="docutils literal"><span class="pre">True</span></tt>, negative states should equate
to <tt class="docutils literal"><span class="pre">False</span></tt>, and indeterminate states should be <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
<p>Values are compared in a case-insensitive manner.</p>
<p>Example (these are also the default values):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">status_choices</span> <span class="o">=</span> <span class="p">(</span>
        <span class="p">(</span><span class="s">&#39;enabled&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;true&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
        <span class="p">(</span><span class="s">&#39;up&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;active&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;on&#39;</span><span class="p">,</span> <span class="bp">True</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;none&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;unknown&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;&#39;</span><span class="p">,</span> <span class="bp">None</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;disabled&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;down&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;false&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;inactive&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">),</span>
        <span class="p">(</span><span class="s">&#39;off&#39;</span><span class="p">,</span> <span class="bp">False</span><span class="p">),</span>
    <span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.display_choices">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">display_choices</tt><a class="headerlink" href="#horizon.tables.base.display_choices" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple of tuples representing the possible values to substitute
the data when displayed in the column cell.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.empty_value">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">empty_value</tt><a class="headerlink" href="#horizon.tables.base.empty_value" title="Permalink to this definition">¶</a></dt>
<dd><p>A string or callable to be used for cells which have no data.
Defaults to the string <tt class="docutils literal"><span class="pre">&quot;-&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.summation">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">summation</tt><a class="headerlink" href="#horizon.tables.base.summation" title="Permalink to this definition">¶</a></dt>
<dd><p>A string containing the name of a summation method to be used in
the generation of a summary row for this column. By default the
options are <tt class="docutils literal"><span class="pre">&quot;sum&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;average&quot;</span></tt>, which behave as expected.
Optional.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.filters">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">filters</tt><a class="headerlink" href="#horizon.tables.base.filters" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of functions (often template filters) to be applied to the
value of the data for this column prior to output. This is effectively
a shortcut for writing a custom <tt class="docutils literal"><span class="pre">transform</span></tt> function in simple cases.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.classes">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">classes</tt><a class="headerlink" href="#horizon.tables.base.classes" title="Permalink to this definition">¶</a></dt>
<dd><p>An iterable of CSS classes which should be added to this column.
Example: <tt class="docutils literal"><span class="pre">classes=('foo',</span> <span class="pre">'bar')</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.attrs">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">attrs</tt><a class="headerlink" href="#horizon.tables.base.attrs" title="Permalink to this definition">¶</a></dt>
<dd><p>A dict of HTML attribute strings which should be added to this column.
Example: <tt class="docutils literal"><span class="pre">attrs={&quot;data-foo&quot;:</span> <span class="pre">&quot;bar&quot;}</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.truncate">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">truncate</tt><a class="headerlink" href="#horizon.tables.base.truncate" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer for the maximum length of the string in this column. If the
data in this column is larger than the supplied number, the data for
this column will be truncated and an ellipsis will be appended to the
truncated data.
Defaults to <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">creation_counter</tt><em class="property"> = 155</em></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">get_data</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Column.get_data"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the final display data for this column from the given inputs.</p>
<p>The return value will be either the attribute specified for this column
or the return value of the attr:<cite>~horizon.tables.Column.transform</cite>
method for this column.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">get_link_url</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Column.get_link_url"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the final value for the column&#8217;s <tt class="docutils literal"><span class="pre">link</span></tt> property.</p>
<p>If <tt class="docutils literal"><span class="pre">allowed_data_types</span></tt> of this column  is not empty and the datum
has an assigned type, check if the datum&#8217;s type is in the
<tt class="docutils literal"><span class="pre">allowed_data_types</span></tt> list. If not, the datum won&#8217;t be displayed
as a link.</p>
<p>If <tt class="docutils literal"><span class="pre">link</span></tt> is a callable, it will be passed the current data object
and should return a URL. Otherwise <tt class="docutils literal"><span class="pre">get_link_url</span></tt> will attempt to
call <tt class="docutils literal"><span class="pre">reverse</span></tt> on <tt class="docutils literal"><span class="pre">link</span></tt> with the object&#8217;s id as a parameter.
Failing that, it will simply return the value of <tt class="docutils literal"><span class="pre">link</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">get_raw_data</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Column.get_raw_data"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the raw data for this column, before any filters or formatting
are applied to it. This is useful when doing calculations on data in
the table.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">get_summation</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Column.get_summation"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the summary value for the data in this column if a
valid summation method is specified for it. Otherwise returns <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">name</tt><em class="property"> = None</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">status_choices</tt><em class="property"> = (('enabled', True), ('true', True), ('up', True), ('active', True), ('on', True), ('none', None), ('unknown', None), ('', None), ('disabled', False), ('down', False), ('false', False), ('inactive', False), ('off', False))</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">summation_methods</tt><em class="property"> = {'sum': &lt;built-in function sum&gt;, 'average': &lt;function &lt;lambda&gt; at 0xa10ab1c&gt;}</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">transform</tt><em class="property"> = None</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Column.</tt><tt class="descname">verbose_name</tt><em class="property"> = None</em></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">DataTable</tt><big>(</big><em>request</em>, <em>data=None</em>, <em>needs_form_wrapper=None</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>A class which defines a table with all data and associated actions.</p>
<dl class="attribute">
<dt id="horizon.tables.base.name">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">name</tt><a class="headerlink" href="#horizon.tables.base.name" title="Permalink to this definition">¶</a></dt>
<dd><p>String. Read-only access to the name specified in the
table&#8217;s Meta options.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.multi_select">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">multi_select</tt><a class="headerlink" href="#horizon.tables.base.multi_select" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean. Read-only access to whether or not this table
should display a column for multi-select checkboxes.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.data">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">data</tt><a class="headerlink" href="#horizon.tables.base.data" title="Permalink to this definition">¶</a></dt>
<dd><p>Read-only access to the data this table represents.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.filtered_data">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">filtered_data</tt><a class="headerlink" href="#horizon.tables.base.filtered_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Read-only access to the data this table represents, filtered by
the <a class="reference internal" href="../../ref/tables.html#horizon.tables.FilterAction.filter" title="horizon.tables.FilterAction.filter"><tt class="xref py py-meth docutils literal"><span class="pre">filter()</span></tt></a> method of the table&#8217;s
<a class="reference internal" href="../../ref/tables.html#horizon.tables.FilterAction" title="horizon.tables.FilterAction"><tt class="xref py py-class docutils literal"><span class="pre">FilterAction</span></tt></a> class (if one is provided)
using the current request&#8217;s query parameters.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">base_actions</tt><em class="property"> = {}</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">base_columns</tt><em class="property"> = {}</em></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">calculate_row_status</tt><big>(</big><em>statuses</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.calculate_row_status"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a boolean value determining the overall row status
based on the dictionary of column name to status mappings passed in.</p>
<p>By default, it uses the following logic:</p>
<ol class="arabic simple">
<li>If any statuses are <tt class="docutils literal"><span class="pre">False</span></tt>, return <tt class="docutils literal"><span class="pre">False</span></tt>.</li>
<li>If no statuses are <tt class="docutils literal"><span class="pre">False</span></tt> but any or <tt class="docutils literal"><span class="pre">None</span></tt>, return <tt class="docutils literal"><span class="pre">None</span></tt>.</li>
<li>If all statuses are <tt class="docutils literal"><span class="pre">True</span></tt>, return <tt class="docutils literal"><span class="pre">True</span></tt>.</li>
</ol>
<p>This provides the greatest protection against false positives without
weighting any particular columns.</p>
<p>The <tt class="docutils literal"><span class="pre">statuses</span></tt> parameter is passed in as a dictionary mapping
column names to their statuses in order to allow this function to
be overridden in such a way as to weight one column&#8217;s status over
another should that behavior be desired.</p>
</dd></dl>

<dl class="classmethod">
<dt>
<em class="property">classmethod </em><tt class="descclassname">DataTable.</tt><tt class="descname">check_handler</tt><big>(</big><em>request</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.check_handler"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Determine whether the request should be handled by this table.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">filtered_data</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.filtered_data"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">footer</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.footer"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_absolute_url</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_absolute_url"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the canonical URL for this table.</p>
<p>This is used for the POST action attribute on the form element
wrapping the table. In many cases it is also useful for redirecting
after a successful action on the table.</p>
<p>For convenience it defaults to the value of
<tt class="docutils literal"><span class="pre">request.get_full_path()</span></tt> with any query string stripped off,
e.g. the path at which the table was requested.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_columns</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_columns"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns this table&#8217;s columns including auto-generated ones.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_empty_message</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_empty_message"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the message to be displayed when there is no data.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_filter_string</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_filter_string"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_marker</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_marker"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the identifier for the last object in the current data set
for APIs that use marker/limit-based paging.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_object_by_id</tt><big>(</big><em>lookup</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_object_by_id"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the data object from the table&#8217;s dataset which matches
the <tt class="docutils literal"><span class="pre">lookup</span></tt> parameter specified. An error will be raised if
the match is not a single data object.</p>
<p>Uses <a class="reference internal" href="../../ref/tables.html#horizon.tables.DataTable.get_object_id" title="horizon.tables.DataTable.get_object_id"><tt class="xref py py-meth docutils literal"><span class="pre">get_object_id()</span></tt></a> internally.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_object_display</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_object_display"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a display name that identifies this object.</p>
<p>By default, this returns a <tt class="docutils literal"><span class="pre">name</span></tt> attribute from the given object,
but this can be overriden to return other values.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_object_id</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_object_id"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the identifier for the object this row will represent.</p>
<p>By default this returns an <tt class="docutils literal"><span class="pre">id</span></tt> attribute on the given object,
but this can be overridden to return other values.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Make sure that the value returned is a unique value for the id
otherwise rendering issues can occur.</p>
</div>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_pagination_string</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_pagination_string"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the query parameter string to paginate this table.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_row_actions</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_row_actions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a list of the action instances for a specific row.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_row_status_class</tt><big>(</big><em>status</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_row_status_class"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a css class name determined by the status value. This class
name is used to indicate the status of the rows in the table if
any <tt class="docutils literal"><span class="pre">status_columns</span></tt> have been specified.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_rows</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_rows"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Return the row data for this table broken out by columns.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">get_table_actions</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.get_table_actions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a list of the action instances for this table.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">has_actions</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.has_actions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Boolean. Indicates whether there are any available actions on this
table.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">has_more_data</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.has_more_data"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a boolean value indicating whether there is more data
available to this table from the source (generally an API).</p>
<p>The method is largely meant for internal use, but if you want to
override it to provide custom behavior you can do so at your own risk.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">is_browser_table</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.is_browser_table"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">maybe_handle</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.maybe_handle"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Determine whether the request should be handled by any action on this
table after data has been loaded.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">maybe_preempt</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.maybe_preempt"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Determine whether the request should be handled by a preemptive action
on this table or by an AJAX row update before loading any data.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">multi_select</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.multi_select"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">name</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.name"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">needs_form_wrapper</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.needs_form_wrapper"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Boolean. Indicates whather this table should be rendered wrapped in
a <tt class="docutils literal"><span class="pre">&lt;form&gt;</span></tt> tag or not.</p>
</dd></dl>

<dl class="staticmethod">
<dt>
<em class="property">static </em><tt class="descclassname">DataTable.</tt><tt class="descname">parse_action</tt><big>(</big><em>action_string</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.parse_action"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Parses the <tt class="docutils literal"><span class="pre">action</span></tt> parameter (a string) sent back with the
POST data. By default this parses a string formatted as
<tt class="docutils literal"><span class="pre">{{</span> <span class="pre">table_name</span> <span class="pre">}}__{{</span> <span class="pre">action_name</span> <span class="pre">}}__{{</span> <span class="pre">row_id</span> <span class="pre">}}</span></tt> and returns
each of the pieces. The <tt class="docutils literal"><span class="pre">row_id</span></tt> is optional.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">render</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.render"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Renders the table using the template from the table options.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">render_row_actions</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.render_row_actions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Renders the actions specified in <tt class="docutils literal"><span class="pre">Meta.row_actions</span></tt> using the
current row data.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">render_table_actions</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.render_table_actions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Renders the actions specified in <tt class="docutils literal"><span class="pre">Meta.table_actions</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">sanitize_id</tt><big>(</big><em>obj_id</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.sanitize_id"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Override to modify an incoming obj_id to match existing
API data types or modify the format.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DataTable.</tt><tt class="descname">take_action</tt><big>(</big><em>action_name</em>, <em>obj_id=None</em>, <em>obj_ids=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTable.take_action"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Locates the appropriate action and routes the object
data to it. The action should return an HTTP redirect
if successful, or a value which evaluates to <tt class="docutils literal"><span class="pre">False</span></tt>
if unsuccessful.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">DataTableMetaclass</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTableMetaclass"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">type</span></tt></p>
<p>Metaclass to add options to DataTable class and collect columns.</p>
</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">DataTableOptions</tt><big>(</big><em>options</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#DataTableOptions"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Contains options for <a class="reference internal" href="../../ref/tables.html#horizon.tables.DataTable" title="horizon.tables.DataTable"><tt class="xref py py-class docutils literal"><span class="pre">DataTable</span></tt></a> objects.</p>
<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">name</tt></dt>
<dd><p>A short name or slug for the table.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">verbose_name</tt></dt>
<dd><p>A more verbose name for the table meant for display purposes.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.columns">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">columns</tt><a class="headerlink" href="#horizon.tables.base.columns" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of column objects or column names. Controls ordering/display
of the columns in the table.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.table_actions">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">table_actions</tt><a class="headerlink" href="#horizon.tables.base.table_actions" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of action classes derived from the
<a class="reference internal" href="../../ref/tables.html#horizon.tables.Action" title="horizon.tables.Action"><tt class="xref py py-class docutils literal"><span class="pre">Action</span></tt></a> class. These actions will handle tasks
such as bulk deletion, etc. for multiple objects at once.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.row_actions">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">row_actions</tt><a class="headerlink" href="#horizon.tables.base.row_actions" title="Permalink to this definition">¶</a></dt>
<dd><p>A list similar to <tt class="docutils literal"><span class="pre">table_actions</span></tt> except tailored to appear for
each row. These actions act on a single object at a time.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.actions_column">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">actions_column</tt><a class="headerlink" href="#horizon.tables.base.actions_column" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean value to control rendering of an additional column containing
the various actions for each row. Defaults to <tt class="docutils literal"><span class="pre">True</span></tt> if any actions
are specified in the <tt class="docutils literal"><span class="pre">row_actions</span></tt> option.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">multi_select</tt></dt>
<dd><p>Boolean value to control rendering of an extra column with checkboxes
for selecting multiple objects in the table. Defaults to <tt class="docutils literal"><span class="pre">True</span></tt> if
any actions are specified in the <tt class="docutils literal"><span class="pre">table_actions</span></tt> option.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.filter">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">filter</tt><a class="headerlink" href="#horizon.tables.base.filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean value to control the display of the &#8220;filter&#8221; search box
in the table actions. By default it checks whether or not an instance
of <a class="reference internal" href="../../ref/tables.html#horizon.tables.FilterAction" title="horizon.tables.FilterAction"><tt class="xref py py-class docutils literal"><span class="pre">FilterAction</span></tt></a> is in <a class="reference internal" href="#horizon.tables.base.table_actions" title="horizon.tables.base.table_actions"><tt class="xref py py-attr docutils literal"><span class="pre">table_actions</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.template">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">template</tt><a class="headerlink" href="#horizon.tables.base.template" title="Permalink to this definition">¶</a></dt>
<dd><p>String containing the template which should be used to render the
table. Defaults to <tt class="docutils literal"><span class="pre">&quot;horizon/common/_data_table.html&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.context_var_name">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">context_var_name</tt><a class="headerlink" href="#horizon.tables.base.context_var_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the context variable which will contain the table when
it is rendered. Defaults to <tt class="docutils literal"><span class="pre">&quot;table&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.pagination_param">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">pagination_param</tt><a class="headerlink" href="#horizon.tables.base.pagination_param" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the query string parameter which will be used when
paginating this table. When using multiple tables in a single
view this will need to be changed to differentiate between the
tables. Default: <tt class="docutils literal"><span class="pre">&quot;marker&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.status_columns">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">status_columns</tt><a class="headerlink" href="#horizon.tables.base.status_columns" title="Permalink to this definition">¶</a></dt>
<dd><p>A list or tuple of column names which represents the &#8220;state&#8221;
of the data object being represented.</p>
<p>If <tt class="docutils literal"><span class="pre">status_columns</span></tt> is set, when the rows are rendered the value
of this column will be used to add an extra class to the row in
the form of <tt class="docutils literal"><span class="pre">&quot;status_up&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;status_down&quot;</span></tt> for that row&#8217;s
data.</p>
<p>The row status is used by other Horizon components to trigger tasks
such as dynamic AJAX updating.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.row_class">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">row_class</tt><a class="headerlink" href="#horizon.tables.base.row_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The class which should be used for rendering the rows of this table.
Optional. Default: <a class="reference internal" href="../../ref/tables.html#horizon.tables.Row" title="horizon.tables.Row"><tt class="xref py py-class docutils literal"><span class="pre">Row</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.column_class">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">column_class</tt><a class="headerlink" href="#horizon.tables.base.column_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The class which should be used for handling the columns of this table.
Optional. Default: <a class="reference internal" href="../../ref/tables.html#horizon.tables.Column" title="horizon.tables.Column"><tt class="xref py py-class docutils literal"><span class="pre">Column</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.mixed_data_type">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">mixed_data_type</tt><a class="headerlink" href="#horizon.tables.base.mixed_data_type" title="Permalink to this definition">¶</a></dt>
<dd><p>A toggle to indicate if the table accepts two or more types of data.
Optional. Default: :<tt class="docutils literal"><span class="pre">False</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.data_types">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">data_types</tt><a class="headerlink" href="#horizon.tables.base.data_types" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of data types that this table would accept. Default to be an
empty list, but if the attibute <tt class="docutils literal"><span class="pre">mixed_data_type</span></tt> is set to <tt class="docutils literal"><span class="pre">True</span></tt>,
then this list must have at least one element.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.data_type_name">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">data_type_name</tt><a class="headerlink" href="#horizon.tables.base.data_type_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of an attribute to assign to data passed to the table when it
accepts mix data. Default: <tt class="docutils literal"><span class="pre">&quot;_table_data_type&quot;</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.footer">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">footer</tt><a class="headerlink" href="#horizon.tables.base.footer" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean to control whether or not to show the table&#8217;s footer.
Default: <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.base.</tt><tt class="descname">Row</tt><big>(</big><em>table</em>, <em>datum=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.utils.html.HTMLElement</span></tt></p>
<p>Represents a row in the table.</p>
<p>When iterated, the <tt class="docutils literal"><span class="pre">Row</span></tt> instance will yield each of its cells.</p>
<p>Rows are capable of AJAX updating, with a little added work:</p>
<p>The <tt class="docutils literal"><span class="pre">ajax</span></tt> property needs to be set to <tt class="docutils literal"><span class="pre">True</span></tt>, and
subclasses need to define a <tt class="docutils literal"><span class="pre">get_data</span></tt> method which returns a data
object appropriate for consumption by the table (effectively the &#8220;get&#8221;
lookup versus the table&#8217;s &#8220;list&#8221; lookup).</p>
<p>The automatic update interval is configurable by setting the key
<tt class="docutils literal"><span class="pre">ajax_poll_interval</span></tt> in the <tt class="docutils literal"><span class="pre">settings.HORIZON_CONFIG</span></tt> dictionary.
Default: <tt class="docutils literal"><span class="pre">2500</span></tt> (measured in milliseconds).</p>
<dl class="attribute">
<dt id="horizon.tables.base.table">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">table</tt><a class="headerlink" href="#horizon.tables.base.table" title="Permalink to this definition">¶</a></dt>
<dd><p>The table which this row belongs to.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.datum">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">datum</tt><a class="headerlink" href="#horizon.tables.base.datum" title="Permalink to this definition">¶</a></dt>
<dd><p>The data object which this row represents.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.id">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">id</tt><a class="headerlink" href="#horizon.tables.base.id" title="Permalink to this definition">¶</a></dt>
<dd><p>A string uniquely representing this row composed of the table name
and the row data object&#8217;s identifier.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.cells">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">cells</tt><a class="headerlink" href="#horizon.tables.base.cells" title="Permalink to this definition">¶</a></dt>
<dd><p>The cells belonging to this row stored in a <tt class="docutils literal"><span class="pre">SortedDict</span></tt> object.
This attribute is populated during instantiation.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">status</tt></dt>
<dd><p>Boolean value representing the status of this row calculated from
the values of the table&#8217;s <tt class="docutils literal"><span class="pre">status_columns</span></tt> if they are set.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.status_class">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">status_class</tt><a class="headerlink" href="#horizon.tables.base.status_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a css class for the status of the row based on <tt class="docutils literal"><span class="pre">status</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.ajax">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">ajax</tt><a class="headerlink" href="#horizon.tables.base.ajax" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean value to determine whether ajax updating for this row is
enabled.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.base.ajax_action_name">
<tt class="descclassname">horizon.tables.base.</tt><tt class="descname">ajax_action_name</tt><a class="headerlink" href="#horizon.tables.base.ajax_action_name" title="Permalink to this definition">¶</a></dt>
<dd><p>String that is used for the query parameter key to request AJAX
updates. Generally you won&#8217;t need to change this value.
Default: <tt class="docutils literal"><span class="pre">&quot;row_update&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">ajax</tt><em class="property"> = False</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">ajax_action_name</tt><em class="property"> = 'row_update'</em></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">get_ajax_update_url</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.get_ajax_update_url"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">get_cells</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.get_cells"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the bound cells for this row in order.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">get_data</tt><big>(</big><em>request</em>, <em>obj_id</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.get_data"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Fetches the updated data for the row based on the object id
passed in. Must be implemented by a subclass to allow AJAX updating.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">load_cells</tt><big>(</big><em>datum=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.load_cells"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Load the row&#8217;s data (either provided at initialization or as an
argument to this function), initiailize all the cells contained
by this row, and set the appropriate row properties which require
the row&#8217;s data to be determined.</p>
<p>This function is called automatically by
<tt class="xref py py-meth docutils literal"><span class="pre">__init__()</span></tt> if the <tt class="docutils literal"><span class="pre">datum</span></tt> argument is
provided. However, by not providing the data during initialization
this function allows for the possibility of a two-step loading
pattern when you need a row instance but don&#8217;t yet have the data
available.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">render</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.render"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">status</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.status"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Row.</tt><tt class="descname">status_class</tt><a class="reference internal" href="../../_modules/horizon/tables/base.html#Row.status_class"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="horizon.tables.actions.html"
                                  title="previous chapter">The <tt class="docutils literal docutils literal"><span class="pre">horizon.tables.actions</span></tt> Module</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="horizon.tables.html"
                                  title="next chapter">The <tt class="docutils literal docutils literal"><span class="pre">horizon.tables</span></tt> Module</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/sourcecode/horizon/horizon.tables.base.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="clearer"></div>
    </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="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="horizon.tables.html" title="The horizon.tables Module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="horizon.tables.actions.html" title="The horizon.tables.actions Module"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">Horizon 2012.2.3 documentation</a> &raquo;</li>
          <li><a href="../autoindex.html" accesskey="U">Source Code Index</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, OpenStack, LLC.
      Last updated on Feb 08, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>