Commit 2db38958 authored by Thomas Mignot's avatar Thomas Mignot

Merge branch 'docs' into 'master'

Docs

See merge request thommignot/pyfront!1
parents 31259fad 945e7cc0
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
# 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: cd28435406f98720424504df0bd68f81
tags: 645f666f9bcd5a90fca523b33c5a78b7
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Overview: module code &#8212; ryzom documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<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>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>All modules for which code is available</h1>
<ul><li><a href="django/db/models/fields/related_descriptors.html">django.db.models.fields.related_descriptors</a></li>
<li><a href="django/db/models/manager.html">django.db.models.manager</a></li>
<li><a href="django/db/models/query_utils.html">django.db.models.query_utils</a></li>
<li><a href="ryzom/apps.html">ryzom.apps</a></li>
<li><a href="ryzom/components.html">ryzom.components</a></li>
<li><a href="ryzom/consumers.html">ryzom.consumers</a></li>
<li><a href="ryzom/ddp.html">ryzom.ddp</a></li>
<li><a href="ryzom/models.html">ryzom.models</a></li>
<li><a href="ryzom/pubsub.html">ryzom.pubsub</a></li>
<li><a href="ryzom/reactive.html">ryzom.reactive</a></li>
<li><a href="ryzom/views.html">ryzom.views</a></li>
</ul>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">ryzom</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../ryzom.html">ryzom package</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Author.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>
</body>
</html>
\ No newline at end of file
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ryzom.apps &#8212; ryzom documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<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>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>Source code for ryzom.apps</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">django.apps</span> <span class="k">import</span> <span class="n">AppConfig</span>
<span class="kn">from</span> <span class="nn">django.db</span> <span class="k">import</span> <span class="n">OperationalError</span><span class="p">,</span> <span class="n">ProgrammingError</span>
<div class="viewcode-block" id="RyzomConfig"><a class="viewcode-back" href="../../ryzom.apps.html#ryzom.apps.RyzomConfig">[docs]</a><span class="k">class</span> <span class="nc">RyzomConfig</span><span class="p">(</span><span class="n">AppConfig</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Ryzom application configuration</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;ryzom&#39;</span>
<div class="viewcode-block" id="RyzomConfig.ready"><a class="viewcode-back" href="../../ryzom.apps.html#ryzom.apps.RyzomConfig.ready">[docs]</a> <span class="k">def</span> <span class="nf">ready</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> AppConfig.ready overloading.</span>
<span class="sd"> Here we import the ryzom.signals module to connect</span>
<span class="sd"> the signals handlers to receivers,</span>
<span class="sd"> then we clean the Clients table (zombies clients stay after</span>
<span class="sd"> a server reboot)</span>
<span class="sd"> Finally, we create the publications that were registered</span>
<span class="sd"> in the to_publish list of ryzom.pusub module.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="kn">import</span> <span class="nn">ryzom.signals</span> <span class="c1"># noqa</span>
<span class="kn">from</span> <span class="nn">ryzom.pubsub</span> <span class="k">import</span> <span class="n">to_publish</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">Clients</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_model</span><span class="p">(</span><span class="s1">&#39;Clients&#39;</span><span class="p">)</span>
<span class="n">Clients</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">()</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span>
<span class="k">for</span> <span class="n">publication</span> <span class="ow">in</span> <span class="n">to_publish</span><span class="p">:</span>
<span class="n">publication</span><span class="o">.</span><span class="n">publish_all</span><span class="p">()</span>
<span class="k">except</span> <span class="p">(</span><span class="n">OperationalError</span><span class="p">,</span> <span class="n">ProgrammingError</span><span class="p">):</span>
<span class="k">pass</span></div></div>
</pre></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">ryzom</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../ryzom.html">ryzom package</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../../index.html">Documentation overview</a><ul>
<li><a href="../index.html">Module code</a><ul>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Author.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ryzom.reactive &#8212; ryzom documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<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>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>Source code for ryzom.reactive</h1><div class="highlight"><pre>
<span></span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd">Defines the ReactiveComponent class to be inherited</span>
<span class="sd">to create reactive content</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="kn">from</span> <span class="nn">asgiref.sync</span> <span class="k">import</span> <span class="n">async_to_sync</span>
<span class="kn">from</span> <span class="nn">channels.layers</span> <span class="k">import</span> <span class="n">get_channel_layer</span>
<span class="kn">from</span> <span class="nn">ryzom.components</span> <span class="k">import</span> <span class="n">Component</span>
<div class="viewcode-block" id="ReactiveComponent"><a class="viewcode-back" href="../../ryzom.reactive.html#ryzom.reactive.ReactiveComponent">[docs]</a><span class="k">class</span> <span class="nc">ReactiveComponent</span><span class="p">(</span><span class="n">Component</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Subclass of component with reactive content.</span>
<span class="sd"> It takes a unique name and a ryzom.views.View in addition</span>
<span class="sd"> to common component parameters.</span>
<span class="sd"> :param str name: The (unique) name of the instance</span>
<span class="sd"> :param View view: The rizom View this instance is attached to</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">view</span><span class="p">,</span> <span class="n">tag</span><span class="o">=</span><span class="s1">&#39;div&#39;</span><span class="p">,</span> <span class="n">content</span><span class="o">=</span><span class="p">[],</span> <span class="n">attr</span><span class="o">=</span><span class="p">{},</span>
<span class="n">events</span><span class="o">=</span><span class="p">{},</span> <span class="n">parent</span><span class="o">=</span><span class="s1">&#39;body&#39;</span><span class="p">,</span> <span class="n">_id</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="bp">self</span><span class="o">.</span><span class="n">view</span> <span class="o">=</span> <span class="n">view</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">tag</span><span class="p">,</span> <span class="n">content</span><span class="p">,</span> <span class="n">attr</span><span class="p">,</span> <span class="n">events</span><span class="p">,</span> <span class="n">parent</span><span class="p">,</span> <span class="n">_id</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">view</span><span class="o">.</span><span class="n">addReactiveComponent</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<div class="viewcode-block" id="ReactiveComponent.setcontent"><a class="viewcode-back" href="../../ryzom.reactive.html#ryzom.reactive.ReactiveComponent.setcontent">[docs]</a> <span class="k">def</span> <span class="nf">setcontent</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> This method should be called only by the associated view</span>
<span class="sd"> to update the component contents, then it sends the new</span>
<span class="sd"> content to the client associated with the view instance</span>
<span class="sd"> :param list(Component) content: A list of Component to replace \</span>
<span class="sd"> the current content of the instance</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">content</span> <span class="o">=</span> <span class="n">content</span>
<span class="bp">self</span><span class="o">.</span><span class="n">preparecontent</span><span class="p">()</span>
<span class="n">channel_name</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">view</span><span class="o">.</span><span class="n">channel_name</span>
<span class="n">channel</span> <span class="o">=</span> <span class="n">get_channel_layer</span><span class="p">()</span>
<span class="n">async_to_sync</span><span class="p">(</span><span class="n">channel</span><span class="o">.</span><span class="n">send</span><span class="p">)(</span><span class="n">channel_name</span><span class="p">,</span> <span class="p">{</span>
<span class="s1">&#39;type&#39;</span><span class="p">:</span> <span class="s1">&#39;handle.ddp&#39;</span><span class="p">,</span>
<span class="s1">&#39;params&#39;</span><span class="p">:</span> <span class="p">{</span>
<span class="s1">&#39;type&#39;</span><span class="p">:</span> <span class="s1">&#39;changed&#39;</span><span class="p">,</span>
<span class="s1">&#39;instance&#39;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">to_obj</span><span class="p">()</span>
<span class="p">}</span>
<span class="p">})</span></div></div>
<div class="viewcode-block" id="ReactiveDiv"><a class="viewcode-back" href="../../ryzom.reactive.html#ryzom.reactive.ReactiveDiv">[docs]</a><span class="k">class</span> <span class="nc">ReactiveDiv</span><span class="p">(</span><span class="n">ReactiveComponent</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">view</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">view</span><span class="p">,</span> <span class="s1">&#39;div&#39;</span><span class="p">,</span>
<span class="n">content</span><span class="o">=</span><span class="n">content</span><span class="p">,</span>
<span class="n">_id</span><span class="o">=</span><span class="n">f</span><span class="s1">&#39;reactive_div_</span><span class="si">{name}</span><span class="s1">&#39;</span><span class="p">)</span></div>
</pre></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">ryzom</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../ryzom.html">ryzom package</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../../index.html">Documentation overview</a><ul>
<li><a href="../index.html">Module code</a><ul>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Author.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
.. ryzom documentation master file, created by
sphinx-quickstart on Tue Mar 12 14:37:35 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to ryzom's documentation!
=================================
.. toctree::
:maxdepth: 4
:caption: Contents:
ryzom
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
ryzom.apps module
=================
.. automodule:: ryzom.apps
:members:
:undoc-members:
:show-inheritance:
ryzom.components module
=======================
.. automodule:: ryzom.components
:members:
:undoc-members:
:show-inheritance:
ryzom.consumers module
======================
.. automodule:: ryzom.consumers
:members:
:undoc-members:
:show-inheritance:
ryzom.ddp module
================
.. automodule:: ryzom.ddp
:members:
:undoc-members:
:show-inheritance:
ryzom.migrations.0001\_initial module
=====================================
.. automodule:: ryzom.migrations.0001_initial
:members:
:undoc-members:
:show-inheritance:
ryzom.migrations package
========================
Submodules
----------
.. toctree::
ryzom.migrations.0001_initial
Module contents
---------------
.. automodule:: ryzom.migrations
:members:
:undoc-members:
:show-inheritance:
ryzom.models module
===================
.. automodule:: ryzom.models
:members:
:undoc-members:
:show-inheritance:
ryzom.pubsub module
===================
.. automodule:: ryzom.pubsub
:members:
:undoc-members:
:show-inheritance:
ryzom.reactive module
=====================
.. automodule:: ryzom.reactive
:members:
:undoc-members:
:show-inheritance:
ryzom.routing module
====================
.. automodule:: ryzom.routing
:members:
:undoc-members:
:show-inheritance:
ryzom package
=============
Submodules
----------
.. toctree::
ryzom.apps
ryzom.components
ryzom.consumers
ryzom.ddp
ryzom.models
ryzom.pubsub
ryzom.reactive
ryzom.routing
ryzom.signals
ryzom.urls
ryzom.views
Module contents
---------------