Commit b87a6163 authored by Christian González's avatar Christian González

update docs

parent 45ddff5c
......@@ -46,14 +46,7 @@ This will output all GDAPS log messages to the console.
Frontend support
----------------
If you want to add frontend support to your project, you need to do as follows:
.. code-block:: bash
pip install gdaps-frontend
Add ``gdaps.frontend`` (before ``gdaps``), and ``webpack_loader`` to Django.
If you want to add frontend support to your project, you need to add ``gdaps.frontend`` (before ``gdaps``!), and ``webpack_loader`` to Django.
Frontend engines are packed in plugin eggs. You can easily install them using pip, e.g.
......@@ -78,28 +71,38 @@ Available plugins ATM:
There are some keys in this section to configure:
mandatory parameters
^^^^^^^^^^^^^^^^^^^^
PROJECT_NAME *
A (machine) name for your project. Django itself does not provide such a name. It ill be used in various places, e.g. when creating frontends for plugins. Must be a valid python identifier.
``PROJECT_NAME``
^^^^^^^^^^^^^^^^
A (machine) name for your project. Django itself does not provide such a name. It ill be used in various places, e.g. when creating frontends for plugins. Must be a valid python identifier.
``FRONTEND_DIR``
^^^^^^^^^^^^^^^^
This is the directory for the frontend, relative to DJANGO_ROOT.
Default: ``frontend``
optional parameters
``FRONTEND_ENGINE``
^^^^^^^^^^^^^^^^^^^
The engine which is used for setting up a frontend. ATM it can only be "vue". In future, maybe other engines are supported (Angular, React, etc.). PRs welcome.
FRONTEND_DIR
This is the directory for the frontend, relative to DJANGO_ROOT.
Default is "frontend".
``FRONTEND_PKG_MANAGER``
^^^^^^^^^^^^^^^^^^^^^^^^
This is the package manager used to init/install packages. It depends on your frontend which are available.
FRONTEND_ENGINE
The engine which is used for setting up a frontend. ATM it can only be "vue". In future, maybe other engines are supported (Angular, React, etc.). PRs welcome.
``PROJECT_TITLE``
^^^^^^^^^^^^^^^^^
A title for your project. If left empty, PROJECT_NAME is taken (without hyphens/underlines and capitalized).
FRONTEND_PKG_MANAGER
This is the package manager used to init/install packages. It depends on your frontend which are available.
Default: ``PROJECT_NAME``, without underlines and capitalized.
``ADMIN``
^^^^^^^^^
True if your app should add the GDAPS specific parts to the Django admin panel. You can e.g. see the installed plugins there.
PROJECT_TITLE
A title for your project. If left empty, PROJECT_NAME is taken (without hyphens/underlines and capitalized).
Default: ``True``
URL handling
------------
...and finally add the URL path for redirecting all to the frontend engine:
.. code-block:: python
......@@ -111,11 +114,12 @@ PROJECT_TITLE
# ... add your fixed URL patterns here, like "admin/", etc.
]
Final step
----------
Now you can initialize the frontend with
.. code-block:: bash
./manage.py initfrontend
This creates a basic boilerplate (previously created with 'vue create' and calls *yarn install* to
install the needed javascript packages.
This creates a basic boilerplate frontend, depending on which engine is installed.
......@@ -11,7 +11,7 @@ GDAPS is a plugin system that can be added to Django, **to make applications tha
Use it at your own risk. **You have been warned.**
.. toctree::
:maxdepth: 3
:maxdepth: 2
:caption: Table of Contents
Introduction
......
......@@ -119,7 +119,6 @@ __service__
# this is not recommended.
p = plugin()
p.do_something()
..
.. _Implementations:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment