3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-29 08:02:25 +00:00
coope/docs/_build/html/modules/utils.html

329 lines
17 KiB
HTML
Raw Normal View History

2019-02-28 12:18:41 +00:00
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Utils documentation &mdash; CoopeV3 3.4.0 documentation</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Django_tex documentation" href="django_tex.html" />
<link rel="prev" title="Forms documentation" href="forms.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> CoopeV3
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="views.html">Views documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="models.html">Models documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">Admin documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="forms.html">Forms documentation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Utils documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-coopeV3.acl">ACL</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-coopeV3.templatetags.vip">CoopeV3 templatetags</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-users.templatetags.users_extra">Users templatetags</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="django_tex.html">Django_tex documentation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">CoopeV3</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>Utils documentation</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/modules/utils.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="utils-documentation">
<h1>Utils documentation<a class="headerlink" href="#utils-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="module-coopeV3.acl">
<span id="acl"></span><h2>ACL<a class="headerlink" href="#module-coopeV3.acl" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="coopeV3.acl.acl_and">
<code class="descclassname">coopeV3.acl.</code><code class="descname">acl_and</code><span class="sig-paren">(</span><em>*perms</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.acl_and" title="Permalink to this definition"></a></dt>
<dd><p>Test if a user has all perms</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.acl.acl_or">
<code class="descclassname">coopeV3.acl.</code><code class="descname">acl_or</code><span class="sig-paren">(</span><em>*perms</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.acl_or" title="Permalink to this definition"></a></dt>
<dd><p>Test if a user has one of perms</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.acl.active_required">
<code class="descclassname">coopeV3.acl.</code><code class="descname">active_required</code><span class="sig-paren">(</span><em>view</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.active_required" title="Permalink to this definition"></a></dt>
<dd><p>Test if the site is active (<a class="reference internal" href="models.html#preferences.models.GeneralPreferences.is_active" title="preferences.models.GeneralPreferences.is_active"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.is_active</span></code></a>).</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.acl.admin_required">
<code class="descclassname">coopeV3.acl.</code><code class="descname">admin_required</code><span class="sig-paren">(</span><em>view</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.admin_required" title="Permalink to this definition"></a></dt>
<dd><p>Test if the user is staff.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.acl.self_or_has_perm">
<code class="descclassname">coopeV3.acl.</code><code class="descname">self_or_has_perm</code><span class="sig-paren">(</span><em>pkName</em>, <em>perm</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.self_or_has_perm" title="Permalink to this definition"></a></dt>
<dd><p>Test if the user is the request user (pk) or has perm permission.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.acl.superuser_required">
<code class="descclassname">coopeV3.acl.</code><code class="descname">superuser_required</code><span class="sig-paren">(</span><em>view</em><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.acl.superuser_required" title="Permalink to this definition"></a></dt>
<dd><p>Test if the user is superuser.</p>
</dd></dl>
</div>
<div class="section" id="module-coopeV3.templatetags.vip">
<span id="coopev3-templatetags"></span><h2>CoopeV3 templatetags<a class="headerlink" href="#module-coopeV3.templatetags.vip" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="coopeV3.templatetags.vip.brewer">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">brewer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.brewer" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.brewer" title="preferences.models.GeneralPreferences.brewer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.brewer</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.global_message">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">global_message</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.global_message" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.global_message" title="preferences.models.GeneralPreferences.global_message"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.global_message</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.grocer">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">grocer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.grocer" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.grocer" title="preferences.models.GeneralPreferences.grocer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.grocer</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.logout_time">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">logout_time</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.logout_time" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.automatic_logout_time" title="preferences.models.GeneralPreferences.automatic_logout_time"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.automatic_logout_time</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.menu">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">menu</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.menu" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.menu" title="preferences.models.GeneralPreferences.menu"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.menu</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.president">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">president</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.president" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.president" title="preferences.models.GeneralPreferences.president"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.president</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.rules">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">rules</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.rules" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.rules" title="preferences.models.GeneralPreferences.rules"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.rules</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.secretary">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">secretary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.secretary" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.secretary" title="preferences.models.GeneralPreferences.secretary"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.secretary</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.statutes">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">statutes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.statutes" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.statutes" title="preferences.models.GeneralPreferences.statutes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.statutes</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.treasurer">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">treasurer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.treasurer" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.treasurer" title="preferences.models.GeneralPreferences.treasurer"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.treasurer</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="coopeV3.templatetags.vip.vice_president">
<code class="descclassname">coopeV3.templatetags.vip.</code><code class="descname">vice_president</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#coopeV3.templatetags.vip.vice_president" title="Permalink to this definition"></a></dt>
<dd><p>A tag which returns <a class="reference internal" href="models.html#preferences.models.GeneralPreferences.vice_president" title="preferences.models.GeneralPreferences.vice_president"><code class="xref py py-attr docutils literal notranslate"><span class="pre">preferences.models.GeneralPreferences.vice_president</span></code></a>.</p>
</dd></dl>
</div>
<div class="section" id="module-users.templatetags.users_extra">
<span id="users-templatetags"></span><h2>Users templatetags<a class="headerlink" href="#module-users.templatetags.users_extra" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="users.templatetags.users_extra.random_filter">
<code class="descclassname">users.templatetags.users_extra.</code><code class="descname">random_filter</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#users.templatetags.users_extra.random_filter" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="django_tex.html" class="btn btn-neutral float-right" title="Django_tex documentation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="forms.html" class="btn btn-neutral float-left" title="Forms documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, Yoann Pietri
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>