Je clique pour mon logement
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jérôme Lebleu dede50d880 [static] Compile et mets à jour les assets en production 1 year ago
assets [fix] Renforce la définition de l'URL d'envoi du formulaire 1 year ago
jcpml [static] Compile et mets à jour les assets en production 1 year ago
requirements [enh] Ajoute une app. forum avec ses vues publiques 1 year ago
styleguide [ui] Améliore le rendu des accordéons de Foundation 1 year ago
.babelrc [enh] Inclus le début des assets mis à jour 1 year ago
.gitignore [enh] Inclus le début des assets mis à jour 1 year ago
.sass-lint.yml [enh] Inclus le début des assets mis à jour 1 year ago
CHANGELOG.md [rel] Nouvelle version 2017.1 1 year ago
LICENSE init 2 years ago
Makefile [ref] Revois les fichiers de base de l'application 1 year ago
README.md [ref] Revois les fichiers de base de l'application 1 year ago
config.env.example [dev] Permets l'installation de l'app. sur un sous-chemin 1 year ago
gulpfile.babel.js [ui] Ajoute et personnalise Plyr comme lecteur vidéo 1 year ago
gulpfile.config.js [ui] Ajoute et personnalise Plyr comme lecteur vidéo 1 year ago
manage.py [ref] Revois les fichiers de base de l'application 1 year ago
package-lock.json [dev] Mets à jour les dépendances NPM 1 year ago
package.json [dev] Mets à jour les dépendances NPM 1 year ago
requirements.txt init 2 years ago
setup.cfg [lint] Passe un coup de linter sur le code Python 1 year ago

README.md

jecliquepourmonlogement.fr

Forum virtuel d'accès au logement, destiné aux jeunes de 18 à 30 ans de la Communauté d’agglomération de Lens-Liévin.

Installation

Dépendances

On a Debian-based host - running at least Debian Stretch, you will need the following packages:

  • python3
  • virtualenv
  • git (needed to retrieve some required Python packages)
  • python3-psycopg2 (optional, in case of a PostgreSQL database)

Étape par étape

In waiting for a complete Makefile, you will have to follow those steps to install the application.

It assumes that you have downloaded the last release of Je clique pour mon logement, extracted it and that you moved to that folder.

  1. Start by creating a new virtual environment under ./venv which gives access to the global site-packages and uses Python 3, and activate it:

    $ virtualenv --system-site-packages -p python3 ./venv
    $ source ./venv/bin/activate
    
  2. Install the required Python packages depending on your environment:

    $ pip install -r requirements/production.txt
    ... or ...
    $ pip install -r requirements/development.txt
    
  3. Configure the application by setting the proper environment variables depending on your environment. You can use the config.env.example which give you the main variables with example values.

    $ cp config.env.example config.env
    $ nano config.env
    

    Note that this ./config.env file will be loaded by default when the application starts. If you don't want that, just move this file away or set the DJANGO_READ_CONFIG_FILE environment variable to false.

  4. Create the database tables - it assumes that you have created the database and set the proper configuration to use it:

    $ ./manage.py migrate
    

That's it! You should now be able to start the Django development server to check that everything is working fine with:

$ ./manage.py runserver

Structure

Vue d'ensemble

All the application files - e.g. Django code including settings, templates and statics - are located into the jcpml/. It should permit in a near future to distribute the application as a Python package and install it system-wide.

Two environments are defined - either for requirements and settings:

  • development: for local application development and testing. It uses a SQLite3 database and enable debugging by default, add some useful settings and applications for development purpose - i.e. the django-debug-toolbar.
  • production: for production. It checks that configuration is set and correct, try to optimize performances and enforce some settings - i.e. HTTPS related ones.

Contenu variable

All the variable content - e.g. user-uploaded media, collected statics - are stored inside the var/ folder. It is also ignored by git as it's specific to each application installation.

So, you will have to configure your Web server to serve the var/media/ and var/static/ folders, which should point to /media/ and /static/, respectively.

Licence

Cette application est développée par Cliss XXI sous licence AGPLv3+.