Skip to content

Commit

Permalink
better docs: extra_fields, form examples, IS_SAFE, scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Jun 2, 2024
1 parent 8b2756c commit b921507
Show file tree
Hide file tree
Showing 59 changed files with 843 additions and 584 deletions.
2 changes: 1 addition & 1 deletion apps/_documentation/static/en/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 620d5de7eb60ba809ac3e2b9f9dd9628
config: 44b3435943ab4835c7a6a204b6a121fa
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file removed apps/_documentation/static/en/_images/form2.png
Binary file not shown.
Binary file removed apps/_documentation/static/en/_images/form3.png
Binary file not shown.
Binary file removed apps/_documentation/static/en/_images/form4.png
Binary file not shown.
Binary file removed apps/_documentation/static/en/_images/form5.png
Binary file not shown.
Binary file removed apps/_documentation/static/en/_images/form6.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '1.20240420.2',
VERSION: '1.20240530.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
10 changes: 5 additions & 5 deletions apps/_documentation/static/en/chapter-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>What is py4web? &mdash; py4web 1.20240420.2 documentation</title>
<title>What is py4web? &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -215,7 +215,7 @@ <h2>Acknowledgments<a class="headerlink" href="#acknowledgments" title="Link to
<li><p><a class="reference external" href="https://github.com/sugizo">sugizo</a></p></li>
<li><p><a class="reference external" href="https://github.com/valq7711">valq7711</a></p></li>
<li><p><a class="reference external" href="https://github.com/Kkeller83">Kevin Keller</a></p></li>
<li><p><a class="reference external" href="mailto:sam&#37;&#52;&#48;dealfaro&#46;com">Sam de Alfaro</a> (logo design)</p></li>
<li><p>Sam de Alfaro <a class="reference external" href="mailto:sam&#37;&#52;&#48;dealfaro&#46;com">sam<span>&#64;</span>dealfaro<span>&#46;</span>com</a> (logo design)</p></li>
</ul>
<p>Special thanks to Sam de Alfaro, who designed the official logo of py4web. We friendly call the logo “Axel the axolotl”: it magically represents the sense of kindness and inclusion. We believe it’s the cornerstone of our growing community.</p>
<img alt="_images/logo.png" src="_images/logo.png" />
Expand Down Expand Up @@ -258,7 +258,7 @@ <h2>Acknowledgments<a class="headerlink" href="#acknowledgments" title="Link to
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-02.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Help, resources and hints &mdash; py4web 1.20240420.2 documentation</title>
<title>Help, resources and hints &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -273,7 +273,7 @@ <h2>How to contribute<a class="headerlink" href="#how-to-contribute" title="Link
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-03.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Installation and Startup &mdash; py4web 1.20240420.2 documentation</title>
<title>Installation and Startup &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/tabs.js?v=3030b3cb"></script>
Expand All @@ -43,7 +43,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -730,7 +730,7 @@ <h3>Deployment on Ubuntu<a class="headerlink" href="#deployment-on-ubuntu" title
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-04.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The Dashboard &mdash; py4web 1.20240420.2 documentation</title>
<title>The Dashboard &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -200,7 +200,7 @@ <h2>Login into the Dashboard<a class="headerlink" href="#login-into-the-dashboar
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-05.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Creating an app &mdash; py4web 1.20240420.2 documentation</title>
<title>Creating an app &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -502,7 +502,7 @@ <h2>Watch for files change<a class="headerlink" href="#watch-for-files-change" t
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
21 changes: 17 additions & 4 deletions apps/_documentation/static/en/chapter-06.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fixtures &mdash; py4web 1.20240420.2 documentation</title>
<title>Fixtures &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -707,6 +707,19 @@ <h2>The Auth fixture<a class="headerlink" href="#the-auth-fixture" title="Link t
with the following fields: username, email, password, first_name,
last_name, sso_id, and action_token (the last two are mostly for
internal use).</p>
<p>If a <code class="docutils literal notranslate"><span class="pre">auth_user</span></code> table is defined before calling <code class="docutils literal notranslate"><span class="pre">auth.enable()</span></code>
the provided table withh be used.</p>
<p>It is also possible to add <code class="docutils literal notranslate"><span class="pre">extra_fields</span></code> to the <code class="docutils literal notranslate"><span class="pre">auth_user</span></code> table,
for example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">extra_fields</span> <span class="o">=</span> <span class="p">[</span>
<span class="n">Field</span><span class="p">(</span><span class="s2">&quot;favorite_color&quot;</span><span class="p">),</span>
<span class="p">]</span>
<span class="n">auth</span> <span class="o">=</span> <span class="n">Auth</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">db</span><span class="p">,</span> <span class="n">extra_fields</span><span class="o">=</span><span class="n">extra_fields</span><span class="p">)</span>
</pre></div>
</div>
<p>In any case, we recommend not to pollute the <code class="docutils literal notranslate"><span class="pre">auth_user</span></code> table with
extra fields but, instead, to use one of more additional custom
tables that reference users and store the required information.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">auth</span></code> object exposes the method:<code class="docutils literal notranslate"><span class="pre">auth.enable()</span></code> which
registers multiple actions including <code class="docutils literal notranslate"><span class="pre">{appname}/auth/login</span></code>.
It requires the presence of the <code class="docutils literal notranslate"><span class="pre">auth.html</span></code> template and the
Expand Down Expand Up @@ -993,7 +1006,7 @@ <h2>Convenience Decorators<a class="headerlink" href="#convenience-decorators" t
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-07.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The Database Abstraction Layer (DAL) &mdash; py4web 1.20240420.2 documentation</title>
<title>The Database Abstraction Layer (DAL) &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -4534,7 +4534,7 @@ <h3>Google NoSQL (Datastore)<a class="headerlink" href="#google-nosql-datastore"
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-08.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The RestAPI &mdash; py4web 1.20240420.2 documentation</title>
<title>The RestAPI &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -1171,7 +1171,7 @@ <h2>The RestAPI response<a class="headerlink" href="#the-restapi-response" title
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
8 changes: 4 additions & 4 deletions apps/_documentation/static/en/chapter-09.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>YATL Template Language &mdash; py4web 1.20240420.2 documentation</title>
<title>YATL Template Language &mdash; py4web 1.20240530.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
Expand All @@ -18,7 +18,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d95ce244"></script>
<script src="_static/documentation_options.js?v=36eae118"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/toggle.js?v=e1b5a5a1"></script>
Expand All @@ -42,7 +42,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.20240420.2
1.20240530.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -762,7 +762,7 @@ <h3>Mobile development<a class="headerlink" href="#mobile-development" title="Li
<label for="switch"></label>
</span>

v: 1.20240420.2
v: 1.20240530.2
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
Expand Down
Loading

0 comments on commit b921507

Please sign in to comment.