Giter Site home page Giter Site logo

aidants_connect's Introduction

Aidants Connect

CircleCI

Aidants Connect est une application web qui propose à des aidants les fonctionnalités suivantes :

  • créer un mandat de connexion via FranceConnect avec un ou plusieurs usagers sur un périmètre et une durée définis ;
  • connecter via FranceConnect un usager dans les conditions des mandats créés ;
  • accéder à des ressources sur l'accompagnement des usagers ;
  • accéder à un suivi de ses mandats.

Pile technique

  • Python 3.7
  • Django 2.2
  • PostgreSQL

Comment installer la base de données (pour Mac OSX)

Installer PostgreSQL

brew install postgresql
brew services start postgresql
createdb `whoami`

Créer la base de données

psql

Dans l'invite de commmande postgreSQL :

CREATE USER aidants_connect_team;
CREATE DATABASE aidants_connect OWNER aidants_connect_team;
ALTER USER aidants_connect_team CREATEDB;
\q

Installer l'application

Dans votre répertoire de travail, créez et activez un environnement virtuel

virtualenv venv
source venv/bin/activate

Installer les dépendances

pip install -r requirements.txt

Si la commande précédente déclenche le message d'erreur suivant ld: library not found for -lssl, essayer :

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/

Changer le fichier .env.example à la racine du projet en .env et ajouter vos informations :

Créer un repertoire staticfiles

mkdir staticfiles

Appliquer les migrations de la base de données

python manage.py migrate

Créer un superuser

python manage.py createsuperuser --username <insert_admin_name> 

Lancer les tests

Installer les éléments suivants :

brew install geckodriver

puis lancer les commandes suivantes :

flake8
python manage.py test

Les tests fonctionnels sont lancés sur http://localhost:3000. Il faut s'assurer que rien d'autre n'occupe ce port pendant les tests.

Lancer l'application

Pour lancer l'application sur le port 3000 :

python manage.py runserver 3000

Annexes

Documentation de FranceConnect FI

here

Ré-initialiser la base de données

Dans le shell

psql

puis, dans l'invite de commande psql

DROP DATABASE aidants_connect;
CREATE DATABASE aidants_connect OWNER aidants_connect_team;
ALTER USER aidants_connect_team CREATEDB;
\q

puis dans le shell

python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser

aidants_connect's People

Contributors

anna-livia avatar berengereaujard avatar flightan avatar jdauphant avatar morendil avatar thimy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.