Quickstart¶
Set up the project on your local machine¶
Clone the repository:
git clone https://github.com/rohitgeddam/FindMyRoomie.gitSetup the virtual environment:
python -m venv venvActivate the virtual environment:
On Mac/Linux:
source venv/bin/activateOn Windows:
venv\Scripts\activate
Install required modules and libraries:
pip install -r requirements.txtRun the application:
cd src python manage.py migrate python manage.py runserver
After adding another field to Model¶
Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema.
python manage.py makemigrations
python manage.py migrate
Populate fake data for testing¶
``` python manage.py seed_users
creates ten fake users¶
python manage.py seed_users 10
Run test¶
In a terminal:
cd src
py manage.py runserver
Open another terminal:
cd src
py manage.py test
Pre Commit Hooks for Black Code formatting and Flake8 Linting¶
run
pre-commit installNow everytime you commit, Black and Flake8 will run automatically and will not allow you to push if the code standards are not met.