diff --git a/source/import_documentation/Components/SiB-Display.rst b/source/import_documentation/Components/SiB-Display.rst index 6a83a0f39114f109710fc535079728eb412ff5db..8ec8dea2bf861901daf18080708c8c1ff2def6e6 100644 --- a/source/import_documentation/Components/SiB-Display.rst +++ b/source/import_documentation/Components/SiB-Display.rst @@ -11,16 +11,16 @@ added to interact with the list of data being displayed. .. code:: html + <!--head--> + <script type="module" src="https://unpkg.com/@startinblox/core@0.9"></script> + + <!--body--> <sib-display - id="list" - data-src="http://localhost:8000/todos/" - value-created="Created by:" - fields="image, status(state), author(created, name), info(task, date), deadline" - widget-image="sib-display-img" - search-fields="name, author" - next="detail" + data-src="https://api.startinblox.com/users/" + fields="first_name, last_name" ></sib-display> + Attributes ---------- diff --git a/source/import_documentation/Helpers-functions.rst b/source/import_documentation/Helpers-functions.rst index f519133d563b3811946136b1bb9d4001a6c42860..5891400c85323c059ee4566eccdbcac5d83efbe3 100644 --- a/source/import_documentation/Helpers-functions.rst +++ b/source/import_documentation/Helpers-functions.rst @@ -1,3 +1,6 @@ +Javascript Helpers +===================== + Helpers fonctions ----------------- @@ -28,6 +31,16 @@ Creating a component, you should import those function like this : You should always use ``importCSS`` and ``importJS`` to make your extra importation. Otherwise, you’ll get this king of message : -:: +.. code:: Le chargement du module à l’adresse « https://the/road/to/your/extra/script » a été bloqué en raison d’un type MIME interdit (« text/html »). + + +Store function +-------------- +Our goal is to avoid manipulating javascript to use our tools. But it can happen that depending on the case you need some small manipulation and these functions can help you. + +Each time you need to use javascript for your development, please give us feedback so that we can take into account your problems in the next versions of the framework. Thanks for! + + .. warning:: + We should define store function, like clearCache() \ No newline at end of file diff --git a/source/import_documentation/faq.rst b/source/import_documentation/faq.rst index fb8e3293188b27a022a5c6eb4adf2ccbb6a4e98f..f67822014c095eed33c678e1028bd8239f00c505 100644 --- a/source/import_documentation/faq.rst +++ b/source/import_documentation/faq.rst @@ -2,7 +2,9 @@ FAQ **** * **How to contribute ?** -Have a look on our `contribution guidelines <https://git.startinblox.com/framework/sib-core/blob/master/CONTRIBUTING.md>`__ +Have a look on our `contribution guidelines <https://git.startinblox.com/framework/sib-core/blob/master/CONTRIBUTING.md>`__. + +If you want to add/change something on this documentation, `here are the instructions <https://git.startinblox.com/documentation/doc>`__. * **Where I can ask for help ?** diff --git a/source/import_documentation/get-started.rst b/source/import_documentation/get-started.rst index 3f6e69a5552a98225d8eea12cac7f07ceb0cecd6..b5171a5e0f3379aec20a5b9681dfd9ec00025c3c 100644 --- a/source/import_documentation/get-started.rst +++ b/source/import_documentation/get-started.rst @@ -60,7 +60,7 @@ DjangoLDP come with packages developed and maintained by the Startin'Blox team. That's it. You're almost ready to start :) -Jump to the `How to install a SiB server <https://docs.startinblox.com/import_documentation/install-sib-server.html>`__ section to follow the configuration. +Jump to the `How to install a SiB server <https://docs.startinblox.com/import_documentation/install-sib-server.html#configure-your-ldp-packages>`__ section to follow the configuration. diff --git a/source/import_documentation/install-sib-server.rst b/source/import_documentation/install-sib-server.rst index 06d82e8abd100febe837e20f892c88672effedd4..92e9b9dbd30b4aa0c05496a22ec5c1a07f50b87e 100644 --- a/source/import_documentation/install-sib-server.rst +++ b/source/import_documentation/install-sib-server.rst @@ -24,6 +24,9 @@ The SIB server requires: Initiate the server =================== +.. note:: + If you're working on many project in Python, we advice you to use `a virtual environement <https://virtualenvwrapper.readthedocs.io/en/latest/>`__. + From a fresh environment, get the last version of the sib-manager: .. code-block:: bash @@ -41,7 +44,20 @@ Create a project structure from a production template: For a development server remove the --production flag. +now your architecture should look like : + +.. code-block:: bash + + sibserver/ + server/ + __init__.py + settings.py + urls.py + wsgi.py + manage.py + packages.yml +For more detail, go to `the official Django project documentation <https://docs.djangoproject.com/en/1.11/intro/tutorial01/>`__. Configure your LDP packages @@ -78,6 +94,10 @@ Configure the server parameters in the packages.yml: admin_email: admin@example.org admin_name: admin admin_pass: admin + registration_open: True + xmpp_url: 'https://jabber.localhost' + jabber_host: 'jabber.localhost' + default_client: 'http://localhost:3000' This configuration works for a local development server but for a production instance you need to setup a postgresql database and configure dependent services: @@ -108,7 +128,7 @@ Install/update the project: .. code-block:: bash - sib install server + sib install sibserver @@ -119,13 +139,18 @@ Run the server in development: .. code-block:: bash - python manage.py runserver 0.0.0.0:8000 + python manage.py runserver +Then go to `http://127.0.0.1:8000/admin/ <http://127.0.0.1:8000/admin/>`__ to acces to your Django administration. + +Jump to the `How to use SiB server <https://docs.startinblox.com/import_documentation/how-to-use-sib-server.html>`__ section to start your first model. -To launch the server in production: -* You have to install the static files with python manage.py collectstatic +To launch the server in production: +------------------------------------ + +* You have to install the static files with `python manage.py collectstatic` * You have to configure your python server to server the script: wsgi.py on the URL api.batman.happy-dev.fr/. diff --git a/source/import_documentation/mixins.rst b/source/import_documentation/mixins.rst index 17b8e3649381e506b35bd78036f6e716c99ed6fb..8e2f48fababbdf8053793ac34c12c648f89d7ba1 100644 --- a/source/import_documentation/mixins.rst +++ b/source/import_documentation/mixins.rst @@ -22,6 +22,11 @@ List `else`, "test", "test", "test" + Triggers the events: + ------------------- + + * + Used in components: ------------------- @@ -43,7 +48,10 @@ Store `counter`, "test", "test ", "test" `else`, "test", "test", "test" + Triggers the events: + ------------------- + * Used in components: ------------------- diff --git a/source/index.rst b/source/index.rst index c08d75d158bf575842ed7bce58bd8a79311d68f7..5bb76e2f7d7ef52bcb4984b4402af91c7f3983b2 100644 --- a/source/index.rst +++ b/source/index.rst @@ -56,6 +56,13 @@ Welcome to Startinblox's documentation! import_documentation/mixins +.. toctree:: + :maxdepth: 2 + :caption: Javascript Api: + + import_documentation/Helpers-functions + + .. toctree:: :maxdepth: 2