Sophie

Sophie

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

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.actions 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.base Module" href="horizon.tables.base.html" />
    <link rel="prev" title="The horizon.views Module" href="horizon.views.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-actions-module">
<h1>The <tt class="xref py py-mod docutils literal"><span class="pre">horizon.tables.actions</span></tt> Module<a class="headerlink" href="#the-horizon-tables-actions-module" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">Action</tt><big>(</big><em>verbose_name=None</em>, <em>verbose_name_plural=None</em>, <em>single_func=None</em>, <em>multiple_func=None</em>, <em>handle_func=None</em>, <em>handles_multiple=False</em>, <em>attrs=None</em>, <em>requires_input=True</em>, <em>allowed_data_types=</em><span class="optional">[</span><span class="optional">]</span>, <em>datum=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#Action"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.tables.actions.BaseAction</span></tt></p>
<p>Represents an action which can be taken on this table&#8217;s data.</p>
<dl class="attribute">
<dt id="horizon.tables.actions.name">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">name</tt><a class="headerlink" href="#horizon.tables.actions.name" title="Permalink to this definition">¶</a></dt>
<dd><p>Required. The short name or &#8220;slug&#8221; representing this
action. This name should not be changed at runtime.</p>
</dd></dl>

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

<dl class="attribute">
<dt id="horizon.tables.actions.verbose_name_plural">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">verbose_name_plural</tt><a class="headerlink" href="#horizon.tables.actions.verbose_name_plural" title="Permalink to this definition">¶</a></dt>
<dd><p>Used like <tt class="docutils literal"><span class="pre">verbose_name</span></tt> in cases where <tt class="docutils literal"><span class="pre">handles_multiple</span></tt> is
<tt class="docutils literal"><span class="pre">True</span></tt>. Defaults to <tt class="docutils literal"><span class="pre">verbose_name</span></tt> with the letter &#8220;s&#8221; appended.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.method">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">method</tt><a class="headerlink" href="#horizon.tables.actions.method" title="Permalink to this definition">¶</a></dt>
<dd><p>The HTTP method for this action. Defaults to <tt class="docutils literal"><span class="pre">POST</span></tt>. Other methods
may or may not succeed currently.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.requires_input">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">requires_input</tt><a class="headerlink" href="#horizon.tables.actions.requires_input" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean value indicating whether or not this action can be taken
without any additional input (e.g. an object id). Defaults to <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.preempt">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">preempt</tt><a class="headerlink" href="#horizon.tables.actions.preempt" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean value indicating whether this action should be evaluated in
the period after the table is instantiated but before the data has
been loaded.</p>
<p>This can allow actions which don&#8217;t need access to the full table data
to bypass any API calls and processing which would otherwise be
required to load the table.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.allowed_data_types">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">allowed_data_types</tt><a class="headerlink" href="#horizon.tables.actions.allowed_data_types" title="Permalink to this definition">¶</a></dt>
<dd><p>A list that contains the allowed data types of the action.  If the
datum&#8217;s type is in this list, the action will be shown on the row
for the datum.</p>
<p>Default to be an empty list (<tt class="docutils literal"><span class="pre">[]</span></tt>). When set to empty, the action
will accept any kind of data.</p>
</dd></dl>

<p>At least one of the following methods must be defined:</p>
<dl class="method">
<dt id="horizon.tables.actions.single">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">single</tt><big>(</big><em>self</em>, <em>data_table</em>, <em>request</em>, <em>object_id</em><big>)</big><a class="headerlink" href="#horizon.tables.actions.single" title="Permalink to this definition">¶</a></dt>
<dd><p>Handler for a single-object action.</p>
</dd></dl>

<dl class="method">
<dt id="horizon.tables.actions.multiple">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">multiple</tt><big>(</big><em>self</em>, <em>data_table</em>, <em>request</em>, <em>object_ids</em><big>)</big><a class="headerlink" href="#horizon.tables.actions.multiple" title="Permalink to this definition">¶</a></dt>
<dd><p>Handler for multi-object actions.</p>
</dd></dl>

<dl class="method">
<dt id="horizon.tables.actions.handle">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">handle</tt><big>(</big><em>self</em>, <em>data_table</em>, <em>request</em>, <em>object_ids</em><big>)</big><a class="headerlink" href="#horizon.tables.actions.handle" title="Permalink to this definition">¶</a></dt>
<dd><p>If a single function can work for both single-object and
multi-object cases then simply providing a <tt class="docutils literal"><span class="pre">handle</span></tt> function
will internally route both <tt class="docutils literal"><span class="pre">single</span></tt> and <tt class="docutils literal"><span class="pre">multiple</span></tt> requests
to <tt class="docutils literal"><span class="pre">handle</span></tt> with the calls from <tt class="docutils literal"><span class="pre">single</span></tt> being transformed
into a list containing only the single object id.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">Action.</tt><tt class="descname">get_param_name</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#Action.get_param_name"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the full POST parameter name for this action.</p>
<p>Defaults to
<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></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Action.</tt><tt class="descname">method</tt><em class="property"> = 'POST'</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">Action.</tt><tt class="descname">requires_input</tt><em class="property"> = True</em></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">BaseAction</tt><big>(</big><em>datum=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction"><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>Common base class for all <tt class="docutils literal"><span class="pre">Action</span></tt> classes.</p>
<dl class="method">
<dt>
<tt class="descclassname">BaseAction.</tt><tt class="descname">allowed</tt><big>(</big><em>request</em>, <em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction.allowed"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Determine whether this action is allowed for the current request.</p>
<p>This method is meant to be overridden with more specific checks.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BaseAction.</tt><tt class="descname">data_type_matched</tt><big>(</big><em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction.data_type_matched"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Method to see if the action is allowed for a certain type of data.
Only affects mixed data type tables.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BaseAction.</tt><tt class="descname">get_default_attrs</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction.get_default_attrs"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a list of the default HTML attributes for the action. Defaults
to returning an <tt class="docutils literal"><span class="pre">id</span></tt> attribute with the value
<tt class="docutils literal"><span class="pre">{{</span> <span class="pre">table.name</span> <span class="pre">}}__action_{{</span> <span class="pre">action.name</span> <span class="pre">}}__{{</span> <span class="pre">creation</span> <span class="pre">counter</span> <span class="pre">}}</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BaseAction.</tt><tt class="descname">get_default_classes</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction.get_default_classes"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns a list of the default classes for the action. Defaults to
<tt class="docutils literal"><span class="pre">[&quot;btn&quot;,</span> <span class="pre">&quot;btn-small&quot;]</span></tt>.</p>
</dd></dl>

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

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

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

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

<dl class="method">
<dt>
<tt class="descclassname">BaseAction.</tt><tt class="descname">update</tt><big>(</big><em>request</em>, <em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BaseAction.update"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Allows per-action customization based on current conditions.</p>
<p>This is particularly useful when you wish to create a &#8220;toggle&#8221;
action that will be rendered differently based on the value of an
attribute on the current row&#8217;s data.</p>
<p>By default this method is a no-op.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">BatchAction</tt><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BatchAction"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.tables.actions.Action</span></tt></p>
<dl class="docutils">
<dt>A table action which takes batch action on one or more</dt>
<dd>objects. This action should not require user input on a
per-object basis.</dd>
</dl>
<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">name</tt></dt>
<dd><p>An internal name for this action.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.action_present">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">action_present</tt><a class="headerlink" href="#horizon.tables.actions.action_present" title="Permalink to this definition">¶</a></dt>
<dd><p>String or tuple/list. The display forms of the name.
Should be a transitive verb, capitalized and translated. (&#8220;Delete&#8221;,
&#8220;Rotate&#8221;, etc.) If tuple or list - then setting
self.current_present_action = n will set the current active item
from the list(action_present[n])</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.action_past">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">action_past</tt><a class="headerlink" href="#horizon.tables.actions.action_past" title="Permalink to this definition">¶</a></dt>
<dd><p>String or tuple/list. The past tense of action_present. (&#8220;Deleted&#8221;,
&#8220;Rotated&#8221;, etc.) If tuple or list - then
setting self.current_past_action = n will set the current active item
from the list(action_past[n])</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.data_type_singular">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">data_type_singular</tt><a class="headerlink" href="#horizon.tables.actions.data_type_singular" title="Permalink to this definition">¶</a></dt>
<dd><p>A display name for the type of data that receives the
action. (&#8220;Keypair&#8221;, &#8220;Floating IP&#8221;, etc.)</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.data_type_plural">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">data_type_plural</tt><a class="headerlink" href="#horizon.tables.actions.data_type_plural" title="Permalink to this definition">¶</a></dt>
<dd><p>Optional plural word for the type of data being acted
on. Defaults to appending &#8216;s&#8217;. Relying on the default is bad
for translations and should not be done.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.success_url">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">success_url</tt><a class="headerlink" href="#horizon.tables.actions.success_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Optional location to redirect after completion of the delete
action. Defaults to the current page.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BatchAction.</tt><tt class="descname">action</tt><big>(</big><em>request</em>, <em>datum_id</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BatchAction.action"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Required. Accepts a single object id and performs the specific action.</p>
<p>Return values are discarded, errors raised are caught and logged.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BatchAction.</tt><tt class="descname">get_success_url</tt><big>(</big><em>request=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BatchAction.get_success_url"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the URL to redirect to after a successful action.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">BatchAction.</tt><tt class="descname">handle</tt><big>(</big><em>table</em>, <em>request</em>, <em>obj_ids</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BatchAction.handle"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

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

<dl class="method">
<dt>
<tt class="descclassname">BatchAction.</tt><tt class="descname">update</tt><big>(</big><em>request</em>, <em>datum</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#BatchAction.update"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Switches the action verbose name, if needed</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">DeleteAction</tt><a class="reference internal" href="../../_modules/horizon/tables/actions.html#DeleteAction"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.tables.actions.BatchAction</span></tt></p>
<dl class="method">
<dt>
<tt class="descclassname">DeleteAction.</tt><tt class="descname">action</tt><big>(</big><em>request</em>, <em>obj_id</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#DeleteAction.action"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DeleteAction.</tt><tt class="descname">action_past</tt><em class="property"> = &lt;django.utils.functional.__proxy__ object at 0xa0fae0c&gt;</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">DeleteAction.</tt><tt class="descname">action_present</tt><em class="property"> = &lt;django.utils.functional.__proxy__ object at 0xa0faa2c&gt;</em></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">DeleteAction.</tt><tt class="descname">delete</tt><big>(</big><em>request</em>, <em>obj_id</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#DeleteAction.delete"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

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

<dl class="attribute">
<dt>
<tt class="descclassname">DeleteAction.</tt><tt class="descname">name</tt><em class="property"> = 'delete'</em></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">FilterAction</tt><big>(</big><em>verbose_name=None</em>, <em>param_name=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#FilterAction"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.tables.actions.BaseAction</span></tt></p>
<p>A base class representing a filter action for a table.</p>
<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">name</tt></dt>
<dd><p>The short name or &#8220;slug&#8221; representing this action. Defaults to
<tt class="docutils literal"><span class="pre">&quot;filter&quot;</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">verbose_name</tt></dt>
<dd><p>A descriptive name used for display purposes. Defaults to the
value of <tt class="docutils literal"><span class="pre">name</span></tt> with the first letter of each word capitalized.</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.param_name">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">param_name</tt><a class="headerlink" href="#horizon.tables.actions.param_name" title="Permalink to this definition">¶</a></dt>
<dd><p>A string representing the name of the request parameter used for the
search term. Default: <tt class="docutils literal"><span class="pre">&quot;q&quot;</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">assign_type_string</tt><big>(</big><em>table</em>, <em>data</em>, <em>type_string</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#FilterAction.assign_type_string"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">data_type_filter</tt><big>(</big><em>table</em>, <em>data</em>, <em>filter_string</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#FilterAction.data_type_filter"><span class="viewcode-link">[source]</span></a></dt>
<dd></dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">filter</tt><big>(</big><em>table</em>, <em>data</em>, <em>filter_string</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#FilterAction.filter"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Provides the actual filtering logic.</p>
<p>This method must be overridden by subclasses and return
the filtered data.</p>
</dd></dl>

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

<dl class="method">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">get_param_name</tt><big>(</big><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#FilterAction.get_param_name"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the full query parameter name for this action.</p>
<p>Defaults to
<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">action.param_name</span> <span class="pre">}}</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">method</tt><em class="property"> = 'POST'</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">name</tt><em class="property"> = 'filter'</em></dt>
<dd></dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">FilterAction.</tt><tt class="descname">verbose_name</tt><em class="property"> = &lt;django.utils.functional.__proxy__ object at 0xa0fa4cc&gt;</em></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">LinkAction</tt><big>(</big><em>verbose_name=None</em>, <em>allowed_data_types=</em><span class="optional">[</span><span class="optional">]</span>, <em>url=None</em>, <em>attrs=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#LinkAction"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">horizon.tables.actions.BaseAction</span></tt></p>
<p>A table action which is simply a link rather than a form POST.</p>
<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">name</tt></dt>
<dd><p>Required. The short name or &#8220;slug&#8221; representing this
action. This name should not be changed at runtime.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">verbose_name</tt></dt>
<dd><p>A string which will be rendered as the link text. (Required)</p>
</dd></dl>

<dl class="attribute">
<dt id="horizon.tables.actions.url">
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">url</tt><a class="headerlink" href="#horizon.tables.actions.url" title="Permalink to this definition">¶</a></dt>
<dd><p>A string or a callable which resolves to a url to be used as the link
target. You must either define the <tt class="docutils literal"><span class="pre">url</span></tt> attribute or override
the <tt class="docutils literal"><span class="pre">get_link_url</span></tt> method on the class.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">horizon.tables.actions.</tt><tt class="descname">allowed_data_types</tt></dt>
<dd><p>A list that contains the allowed data types of the action.  If the
datum&#8217;s type is in this list, the action will be shown on the row
for the datum.</p>
<p>Defaults to be an empty list (<tt class="docutils literal"><span class="pre">[]</span></tt>). When set to empty, the action
will accept any kind of data.</p>
</dd></dl>

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

<dl class="method">
<dt>
<tt class="descclassname">LinkAction.</tt><tt class="descname">get_link_url</tt><big>(</big><em>datum=None</em><big>)</big><a class="reference internal" href="../../_modules/horizon/tables/actions.html#LinkAction.get_link_url"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Returns the final URL based on the value of <tt class="docutils literal"><span class="pre">url</span></tt>.</p>
<p>If <tt class="docutils literal"><span class="pre">url</span></tt> is callable it will call the function.
If not, it will then try to call <tt class="docutils literal"><span class="pre">reverse</span></tt> on <tt class="docutils literal"><span class="pre">url</span></tt>.
Failing that, it will simply return the value of <tt class="docutils literal"><span class="pre">url</span></tt> as-is.</p>
<p>When called for a row action, the current row data object will be
passed as the first parameter.</p>
</dd></dl>

<dl class="attribute">
<dt>
<tt class="descclassname">LinkAction.</tt><tt class="descname">method</tt><em class="property"> = 'GET'</em></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.views.html"
                                  title="previous chapter">The <tt class="docutils literal"><span class="pre">horizon.views</span></tt> Module</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="horizon.tables.base.html"
                                  title="next chapter">The <tt class="docutils literal docutils literal"><span class="pre">horizon.tables.base</span></tt> Module</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/sourcecode/horizon/horizon.tables.actions.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.base.html" title="The horizon.tables.base Module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="horizon.views.html" title="The horizon.views 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>