From a0d245b7c954e19e6bbd16809ea5345bacae1406 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Mon, 11 May 2020 15:02:42 +0200 Subject: [PATCH] update --- .../Components/SiB-Display.rst | 14 ++++---- .../Helpers-functions.rst | 15 ++++++++- source/import_documentation/faq.rst | 4 ++- source/import_documentation/get-started.rst | 2 +- .../install-sib-server.rst | 33 ++++++++++++++++--- source/import_documentation/mixins.rst | 8 +++++ source/index.rst | 7 ++++ 7 files changed, 69 insertions(+), 14 deletions(-) diff --git a/source/import_documentation/Components/SiB-Display.rst b/source/import_documentation/Components/SiB-Display.rst index 6a83a0f..8ec8dea 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 f519133..5891400 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 fb8e329..f678220 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 3f6e69a..b5171a5 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 06d82e8..92e9b9d 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 17b8e36..8e2f48f 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 c08d75d..5bb76e2 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 -- GitLab