A Django-based website for http://globaltrademotors.com
Python 2.7piphttps://pypi.python.org/pypi/pip
Create a virtual environment trademotors and activate.
pip install virtualenv
virtualenv trademotors
cd trademotors
source bin/activategit clone git@github.com:sitture/trade-motors.git .pip install -r requirements.txtOnce the above packages are installed successfully, you should then be able to run the django server.
To run the application locally, open the file src/gp_cars/settings/local.py and set DEBUG to True.
cd src
python manage.py runserverFrom the src directory, run the below to execute tests.
python manage.py testFrom the top-level directory, run the below to execute linting.
flake8 --config setup.cfgIf you are comfortable using Docker, you can build this image, run it using sqlite inner database or run it using docker compose along with a MySQL server.
As you can imagine, the only command to build this image is:
docker build -t trade-motors:0.1.0 .If the image fails on the building process, check out the log, could be failing tests.
Once the image is built, you can run it:
docker run -d -p 8000:8000 trade-motors:0.1.0In addition, you can run the build tests any time after this with:
docker run trade-motors:0.1.0 python manage.py testYou can run this image using the docker-compose.yml file. Using it you can test this application with a MySQL Server configuration. In order to get this stack running locally:
docker-compose up -dThis stack uses a .env file containing the environment variables needed to run both web and database server.
If you'd like to contribute to this repo checkout the Contributing Guide which will get you up to speed with the way the project is set up.