Code Monkey home page Code Monkey logo

oc-p13-lettings's Introduction

Résumé

Site web d'Orange County Lettings

Développement local

Prérequis

  • Compte GitHub avec accès en lecture à ce repository
  • Git CLI
  • SQLite3 CLI
  • Interpréteur Python, version 3.6 ou supérieure

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

Cloner le repository

  • cd /path/to/put/project/in
  • git clone https://github.com/OpenClassrooms-Student-Center/Python-OC-Lettings-FR.git

Créer l'environnement virtuel

  • cd /path/to/Python-OC-Lettings-FR
  • python -m venv venv
  • 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
  • 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

Exécuter le site

  • cd /path/to/Python-OC-Lettings-FR
  • source venv/bin/activate
  • pip install --requirement requirements.txt
  • python manage.py runserver
  • 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/Python-OC-Lettings-FR
  • source venv/bin/activate
  • flake8

Tests unitaires

  • cd /path/to/Python-OC-Lettings-FR
  • source venv/bin/activate
  • pytest

Base de données

  • cd /path/to/Python-OC-Lettings-FR
  • Ouvrir une session shell sqlite3
  • Se connecter à la base de données .open oc-lettings-site.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

Panel d'administration

  • Aller sur http://localhost:8000/admin
  • Connectez-vous avec l'utilisateur admin, mot de passe Abc1234!

Windows

Utilisation de PowerShell, comme ci-dessus sauf :

  • Pour activer l'environnement virtuel, .\venv\Scripts\Activate.ps1
  • Remplacer which <my-command> par (Get-Command <my-command>).Path

oc-p13-lettings's People

Contributors

florianmgs avatar grking8 avatar colinmeldrum avatar

Watchers

 avatar  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.