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