Codebase for Best Flight
, where we get the best flight ticket to move around the world
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To install this project you need the following framework and tools
- python (v 3.6.5)
- Postgres
├── api
│ ├── vi
│ | ├── __init__.py
| | ├── serializers.py
| | ├── views.py
│ ├── tests
| ├── __init__.py
│ ├── urls.py
├── bestflightUser
│ ├── migrations
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── config
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── bestflightApp
│ ├── migrations
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── .env
├── .gitignore
├── .flake8
├── .coveragerc
├── .travis.yml
├── LICENSE
├── manage.py
├── Pipfile
├── Pipfile.lock
├── Procfile
└── README.md
- clone the repository.
- move into the newly created directory (default is best-flight)
- Create a local postgres database locally (best_flight)
- create an .env file and copy the sample from env.sample file. Ensure to update the .env with real values
- add the DATBASE_URL of the local database to the .env file.
- install
pipenv <pip install pipenv>
and activate itpipenv shell
. - Run
pipenv install --dev
to install all project dependencies. - Run migration with
python manage.py migrate
. - Start the app with
python manage.py runserver
- Turn on the service via
make up
- Run latest migrations
make migrate
- use the app
you can run the test by running
make test APP=app_name
note: remove the APP
argument to run every test
-
run cron locally:
we use https://pypi.org/project/django-crontab/ locally
To register the cron jobs; enter
python manage.py crontab add
-
run cron on Heroku we use https://pypi.org/project/APScheduler/, instructions can be found here https://devcenter.heroku.com/articles/clock-processes-python
WE adhere to pep8 standard
The details of the features can be found here
This project is licensed under the MIT License - see the LICENSE.md file for details