This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
M2OLA/backend/README.md

76 lines
1.1 KiB
Markdown
Raw Normal View History

2017-01-20 18:47:07 +00:00
# OLA Flask APP
BackEnd pour l'application du livret de l'altrenant
## Installer les dépendances
Required :
* Python >= 3.4 with pip (Un VirtualEnv est conseillé !)
2017-01-20 18:47:07 +00:00
## Python
Si vous utilisez un virtualenv :
Créer et activer le virtualenv :
2017-01-20 18:47:07 +00:00
```
cd backend
virtualenv .
bin/activate
```
Installer les dépendances via pip :
```
pip install -r requirements/common.txt
```
## Run the App
### Fichier Configuration
Dans app/config.py:
* Configuration les paramètres de la base de données
2017-01-20 18:47:07 +00:00
* Changer la SECRET_KEY en production
### Init App
First you need to create the db and seed it with an admin user (admin@admin.com/admin).
Migration database is handle via flask-migrate using alembic.
See command available :
```
python manage.py db
```
#### Init db
Installez la dernière version de MariaDB:
2017-01-20 18:47:07 +00:00
Lancer le script :
```
mysql -u root < ola_export.mysql
```
### Launch the App
#### For production server
```
python manage.py runserver
```
#### For Debug server
```
python manage.py -d runserver
```
## Run Tests
```
python manage.py runtests
```