mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
documentation: add help ressources and update installation instructions
This commit is contained in:
parent
bfa4000365
commit
77dddbc581
@ -25,7 +25,7 @@ All documentation is in the ``docs`` directory and online at https://sith-ae.rea
|
|||||||
If you want to contribute, here's how we recommend to read the docs:
|
If you want to contribute, here's how we recommend to read the docs:
|
||||||
|
|
||||||
* First, it's advised to read the about part of the project to understand the goals and the mindset of the current and previous maintainers and know what to expect to learn.
|
* First, it's advised to read the about part of the project to understand the goals and the mindset of the current and previous maintainers and know what to expect to learn.
|
||||||
* If in the first part you find you need more background about what we use, we provide some links to tutorials and documentation at the end of our documentation. Feel free to use it and complete it with what you found helpful.
|
* If in the first part you realize that you need more background about what we use, we provide some links to tutorials and documentation at the end of our documentation. Feel free to use it and complete it with what you found helpful.
|
||||||
* Keep in mind that this documentation is thought to be read in order.
|
* Keep in mind that this documentation is thought to be read in order.
|
||||||
|
|
||||||
To join our team :
|
To join our team :
|
||||||
|
@ -63,6 +63,7 @@ Python et Django
|
|||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* `Apprendre Python <https://openclassrooms.com/fr/courses/235344-apprenez-a-programmer-en-python>`__
|
* `Apprendre Python <https://openclassrooms.com/fr/courses/235344-apprenez-a-programmer-en-python>`__
|
||||||
|
* `Apprendre Django <https://openclassrooms.com/fr/courses/1871271-developpez-votre-site-web-avec-le-framework-django>`__
|
||||||
* `Documentation de Django <https://docs.djangoproject.com/fr/1.11/>`__
|
* `Documentation de Django <https://docs.djangoproject.com/fr/1.11/>`__
|
||||||
* `Classy Class-Based Views <http://ccbv.co.uk/projects/Django/1.11/>`__
|
* `Classy Class-Based Views <http://ccbv.co.uk/projects/Django/1.11/>`__
|
||||||
|
|
||||||
|
@ -7,12 +7,14 @@ Dépendances du système
|
|||||||
Certaines dépendances sont nécessaires niveau système :
|
Certaines dépendances sont nécessaires niveau système :
|
||||||
|
|
||||||
* virtualenv
|
* virtualenv
|
||||||
* limysqlclient
|
* libmysqlclient
|
||||||
* libssl
|
* libssl
|
||||||
* libjpeg
|
* libjpeg
|
||||||
* python3-xapian
|
* python3-xapian
|
||||||
* zlib1g-dev
|
* zlib1g-dev
|
||||||
* python3
|
* python3
|
||||||
|
* gettext
|
||||||
|
* graphviz
|
||||||
* mysql-client (pour migrer de l'ancien site)
|
* mysql-client (pour migrer de l'ancien site)
|
||||||
|
|
||||||
Sur Ubuntu
|
Sur Ubuntu
|
||||||
@ -20,8 +22,8 @@ Sur Ubuntu
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev libffi-dev python3-dev libgraphviz-dev pkg-config python3-xapian gettext git
|
sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev libffi-dev python3-dev libgraphviz-dev pkg-config python3-xapian gettext git
|
||||||
sudo pip3 install virtualenv
|
sudo pip3 install virtualenv
|
||||||
|
|
||||||
Sur MacOS
|
Sur MacOS
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
@ -30,26 +32,45 @@ Pour installer les dépendances, il est fortement recommandé d'installer le ges
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
brew install git python xapian
|
brew install git python xapian graphviz
|
||||||
pip install virtualenv
|
|
||||||
|
# Si vous aviez une version de python ne venant pas de homebrew
|
||||||
|
brew link --overwrite python
|
||||||
|
|
||||||
|
|
||||||
|
# Pour bien configurer gettext
|
||||||
|
brew link gettext # (suivez bien les instructions supplémentaires affichées)
|
||||||
|
|
||||||
|
# Pour installer virtualenv
|
||||||
|
pip3 install virtualenv
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Si vous rencontrez des erreurs lors de votre configuration, n'hésitez pas à vérifier l'état de votre installation homebrew avec :code:`brew doctor`
|
||||||
|
|
||||||
Installer le projet
|
Installer le projet
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
git clone https://ae-dev.utbm.fr/ae/Sith.git
|
git clone https://ae-dev.utbm.fr/ae/Sith.git
|
||||||
cd Sith
|
cd Sith
|
||||||
|
|
||||||
# Prépare et active l'environnement du projet
|
# Prépare et active l'environnement du projet
|
||||||
virtualenv --system-site-packages --python=python3 env
|
virtualenv --system-site-packages --python=python3 env
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
|
|
||||||
# Installe les dépendances du projet
|
# Installe les dépendances du projet
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Prépare la base de donnée
|
# Si vous avez des problèmes avec graphiviz
|
||||||
./manage.py setup
|
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"
|
||||||
|
|
||||||
|
# Prépare la base de donnée
|
||||||
|
./manage.py setup
|
||||||
|
|
||||||
|
# Installe les traductions
|
||||||
|
./manage compilemessages
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -62,8 +83,8 @@ Lorsqu'on souhaite développer pour le site, il est nécessaire de passer le log
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
echo "DEBUG=True" > sith/settings_custom.py
|
echo "DEBUG=True" > sith/settings_custom.py
|
||||||
echo 'SITH_URL = "localhost:8000"' >> sith/settings_custom.py
|
echo 'SITH_URL = "localhost:8000"' >> sith/settings_custom.py
|
||||||
|
|
||||||
Démarrer le serveur de développement
|
Démarrer le serveur de développement
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -72,11 +93,11 @@ Il faut toujours avoir préalablement activé l'environnement virtuel comme fait
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
./manage.py runserver
|
./manage.py runserver
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Le serveur est alors accessible à l'adresse http://localhost:8000.
|
Le serveur est alors accessible à l'adresse http://localhost:8000.
|
||||||
|
|
||||||
Générer la documentation
|
Générer la documentation
|
||||||
------------------------
|
------------------------
|
||||||
@ -87,7 +108,7 @@ Pour l'utiliser en local ou globalement pour la modifier, il existe une commande
|
|||||||
|
|
||||||
.. sourcecode:: bash
|
.. sourcecode:: bash
|
||||||
|
|
||||||
./manage.py documentation
|
./manage.py documentation
|
||||||
|
|
||||||
Lancer les tests
|
Lancer les tests
|
||||||
----------------
|
----------------
|
||||||
|
Loading…
Reference in New Issue
Block a user