Skip to content

Commit

Permalink
Merge pull request #186 from radinamatic/add-404
Browse files Browse the repository at this point in the history
Add 404 page to v0.4.x branch
  • Loading branch information
radinamatic committed Aug 26, 2020
2 parents 3c7198a + 4ad0771 commit f0ba4e4
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 17 deletions.
17 changes: 17 additions & 0 deletions docs/404.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:orphan:

Page not found
==============

It seems you are searching for a topic that has been moved elsewhere in our documentation. Please try the following to find what you were looking for:

* Browse the table of content in the sidebar
* Use the search box


Use |menu| to open the table of contents if you are on the mobile device.

.. tip:: Make sure you are browsing the user guide for the `latest release of Kolibri <https://kolibri.readthedocs.io/en/latest/>`_.


We apologize for the inconvenience!
3 changes: 3 additions & 0 deletions docs/_static/theme_overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

@import url("https://fonts.googleapis.com/icon?family=Material+Icons");

5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
parent = os.path.dirname(cwd)
sys.path.insert(0, os.path.abspath(parent))

extensions = [
'sphinx.ext.autodoc',
'notfound.extension',
]

builddir = os.path.join(cwd, '_build')

# -- General configuration -----------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/dev/content/concepts_and_definitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ ContentDB Diagram
.. image:: ../img/content_distributed_db.png
.. Source: https://www.draw.io/#G0B5xDzmtBJIQlNlEybldiODJqUHM
**PK = Primary Key
**FK = Foreign Key
**M2M = ManyToManyField
* PK = Primary Key
* FK = Foreign Key
* M2M = ManyToManyField

ContentTag
----------
Expand Down
7 changes: 0 additions & 7 deletions docs/dev/dataflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,13 @@ If it is important to get data that has not been cached, you can call the :code:

.. code-block:: javascript
contentModel.fetch({}, true).then((data) => {
logging.info('This is definitely the most up to date model data: ', data);
});
Collections
~~~~~~~~~~~

For particular views on a data table (which could range from 'show me everything' to 'show me all content nodes with titles starting with "p"') - Collections are used.
Collections are a cached view onto the data table, which are populated by Models - so if a Model that has previously been fetched from the server by a Collection is requested from :code:`getModel`, it is already cachced.

.. code-block:: javascript
// corresponds to /api/content/<channelId>/contentnode/?popular=1
const contentCollection = ContentNodeResource.getCollection({ channel_id: channelId }, { popular: 1 });
The first argument defines any additional required :code:`resourceIdentifiers` that we need to build up the URL, while the second argument defines the GET parameters that are used to define the filters to be applied to the data and hence the subset of the data that the Collection represents.

We now have a reference for a representation of this data on the server. To ensure that it has data from the server, we can call :code:`fetch` on it, this will resolve to an array of the returned data objects
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The ``ready`` method will be automatically executed once the Module is loaded an
Content Renderers
~~~~~~~~~~~~~~~~~

A special kind of Kolibri Module is dedicated to rendering particular content types. All content renderers should extend the ``ContentRendererModule`` class found in `kolibri/core/assets/src/content_renderer_module.js`. In addition, rather than subclassing the ``WebpackBundleHook`` class, content renderers should be defined in the Python code using the ``ContentRendererHook`` class defined in ``kolibri.content.hooks``. In addition to the standard options for the ``WebpackBundleHook``, the ``ContentRendererHook`` also accepts a json file defining the content types that it renders::
A special kind of Kolibri Module is dedicated to rendering particular content types. All content renderers should extend the ``ContentRendererModule`` class found in `kolibri/core/assets/src/content_renderer_module.js`. In addition, rather than subclassing the ``WebpackBundleHook`` class, content renderers should be defined in the Python code using the ``ContentRendererHook`` class defined in ``kolibri.content.hooks``. In addition to the standard options for the ``WebpackBundleHook``, the ``ContentRendererHook`` also accepts a json file defining the content types that it renders:

.. automodule:: kolibri.content.hooks
:members:
Expand Down
2 changes: 0 additions & 2 deletions docs/dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ References
.. toctree::
:maxdepth: 1

cli
files
glossary
building
../py_modules/modules
6 changes: 2 additions & 4 deletions docs/user/cli.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

The ``kolibri`` command
=======================

Expand All @@ -21,7 +23,3 @@ In addition to the docs displayed below, there are some special forms of the ``k
.. note::

The commands above reload the Python code on changes, but they do *not* run python tests.

.. automodule:: kolibri.utils.cli
:undoc-members:
:show-inheritance:

0 comments on commit f0ba4e4

Please sign in to comment.