Translation EN>FR

This commit is contained in:
colinmeldrum
2020-09-17 10:50:29 +02:00
committed by GitHub
parent f1748e9c71
commit 72c0703d83

View File

@@ -1,78 +1,77 @@
## Summary
## Résumé
Orange County Lettings Website
Site web d'Orange County Lettings
## Local development
## veloppement local
### Prerequisites
### Prérequis
- GitHub account with read access to this repository
- Compte GitHub avec accès en lecture à ce repository
- Git CLI
- SQLite3 CLI
- Python interpreter, version 3.6 or higher
- Interpréteur Python, version 3.6 ou supérieure
In the rest of the local development documentation, it is assumed the command `python` in
your OS shell runs the above Python interpreter (unless a virtual environment is activated).
Dans le reste de la documentation sur le développement local, il est supposé que la commande `python` de votre OS shell exécute l'interpréteur Python ci-dessus (à moins qu'un environnement virtuel ne soit activé).
### macOS / Linux
#### Clone the repository
#### Cloner le repository
- `cd /path/to/put/project/in`
- `git clone https://github.com/grking8/oc-lettings-site.git`
- `git clone https://github.com/OpenClassrooms-Student-Center/Python-OC-Lettings-FR.git`
#### Create the virtual environment
#### Créer l'environnement virtuel
- `cd /path/to/oc-lettings-site`
- `cd /path/to/Python-OC-Lettings-FR`
- `python -m venv venv`
- `apt-get install python3-venv` (If previous step errors with package not found on Ubuntu)
- Activate the environment `source venv/bin/activate`
- Confirm the command `python` now runs the Python interpreter in the virtual environment,
- `apt-get install python3-venv` (Si l'étape précédente comporte des erreurs avec un paquet non trouvé sur Ubuntu)
- Activer l'environnement `source venv/bin/activate`
- Confirmer que la commande `python` exécute l'interpréteur Python dans l'environnement virtuel
`which python`
- Confirm the version of the Python interpreter is 3.6 or higher `python --version`
- Confirm the command `pip` runs the pip executable in the virtual environment, `which pip`
- To deactivate the environment, `deactivate`
- Confirmer que la version de l'interpréteur Python est la version 3.6 ou supérieure `python --version`
- Confirmer que la commande `pip` exécute l'exécutable pip dans l'environnement virtuel, `which pip`
- Pour désactiver l'environnement, `deactivate`
#### Run the site
#### Exécuter le site
- `cd /path/to/oc-lettings-site`
- `cd /path/to/Python-OC-Lettings-FR`
- `source venv/bin/activate`
- `pip install --requirement requirements.txt`
- `python manage.py runserver`
- Go to `http://localhost:8000` in a browser.
- Confirm the site is running and can be navigated (you should see several profiles and lettings).
- Aller sur `http://localhost:8000` dans un navigateur.
- Confirmer que le site fonctionne et qu'il est possible de naviguer (vous devriez voir plusieurs profils et locations).
#### Linting
- `cd /path/to/oc-lettings-site`
- `cd /path/to/Python-OC-Lettings-FR`
- `source venv/bin/activate`
- `flake8`
#### Unit tests
#### Tests unitaires
- `cd /path/to/oc-lettings-site`
- `cd /path/to/Python-OC-Lettings-FR`
- `source venv/bin/activate`
- `pytest`
#### Database
#### Base de données
- `cd /path/to/oc-lettings-site`
- Open a shell session `sqlite3`
- Connect to the database `.open oc-lettings-site.sqlite3`
- Display tables in the database `.tables`
- Display columns in the profiles table, `pragma table_info(oc_lettings_site_profile);`
- Run a query on the profiles table, `select user_id, favorite_city from
oc_lettings_site_profile where favorite_city like 'B%';`
- `.quit` to exit
- `cd /path/to/Python-OC-Lettings-FR`
- Ouvrir une session shell `sqlite3`
- Se connecter à la base de données `.open Python-OC-Lettings-FR.sqlite3`
- Afficher les tables dans la base de données `.tables`
- Afficher les colonnes dans le tableau des profils, `pragma table_info(Python-OC-Lettings-FR_profile);`
- Lancer une requête sur la table des profils, `select user_id, favorite_city from
Python-OC-Lettings-FR_profile where favorite_city like 'B%';`
- `.quit` pour quitter
#### Admin panel
#### Panel d'administration
- Go to `http://localhost:8000/admin`
- Login with user `admin`, password `Abc1234!`
- Aller sur `http://localhost:8000/admin`
- Connectez-vous avec l'utilisateur `admin`, mot de passe `Abc1234!`
### Windows
Using PowerShell, as above except:
Utilisation de PowerShell, comme ci-dessus sauf :
- To activate the virtual environment, `.\venv\Scripts\Activate.ps1`
- Replace `which <my-command>` with `(Get-Command <my-command>).Path`
- Pour activer l'environnement virtuel, `.\venv\Scripts\Activate.ps1`
- Remplacer `which <my-command>` par `(Get-Command <my-command>).Path`