Skip to main content

Sparesnmechs project

Project description

This is a platform that connects car owners to spare part dealers and mechanics.

How to install the project

Prerequisites

Make sure you have the following before beginning:

  • python3-dev

  • git

  • pip

  • virtualenv

  • postgresql

Cloning from Github

From your terminal got to the directory you want to clone your project into.

$ cd path/to/your/directory

Clone the project

$ cd git clone git@github.com:sparesnmechs/sparesnmechs.git

Set up the environment variables

Create a env.sh file in your parent project directory

$ cd path/to/your/directory/sparesnmechs
$ touch env.sh

Add these environment variables to your env.sh file:

#!/usr/bin/env bash

export SECRET_KEY="your-secret-key"
export DEBUG="true"  #For development only
export DB_NAME="db_name"
export DB_USER="db_user"
export DB_PASS="db_pass"
export DB_HOST="127.0.0.1"
export DB_PORT="5432"

Setting up the projects dependencies

Navigate into the projects directory from the terminal.

$ cd path/to/your/directory/sparesnmechs

Create a virtual environment for your project

$ python3 -m venv name-of-your-virtualenv

Activate your virtual environment.

$ source name-of-your-virtualenv/bin/activate

Source your env.sh file.

$ source env.sh

Install the requirements.

(name-of-your-virtualenv)$ pip install -r requirements.txt

Running and testing the project

Create a postgresql database with the information in env.sh.

Make the initial migrations:

(name-of-your-virtualenv)$ ./manage.py makemigrations
(name-of-your-virtualenv)$ ./manage.py migrate

To run the project:

(name-of-your-virtualenv)$ ./manage.py runserver # the information below will be displayed if everything is okay
Performing system checks...

System check identified no issues (0 silenced).
December 7, 2019 - 18:55:56
Django version 3.0, using settings 'config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

To test the project:

(name-of-your-virtualenv)$ tox -r # This will run all the tests in the project

Credits

Developed by Kenneth Mathenge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparesnmechs-0.0.1.tar.gz (823.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparesnmechs-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file sparesnmechs-0.0.1.tar.gz.

File metadata

  • Download URL: sparesnmechs-0.0.1.tar.gz
  • Upload date:
  • Size: 823.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for sparesnmechs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 488aceec3c24296c191ae2940d4e48c2a58291b14a2b4a2dd576f22846457f32
MD5 a75d1d60eb133580ec46bcd42e5b3070
BLAKE2b-256 79e03fddb6566248157ad75d32d3764bd5310304cc0428ae682f3481bc766ff9

See more details on using hashes here.

File details

Details for the file sparesnmechs-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sparesnmechs-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for sparesnmechs-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4e7cfbbedd677b913b65d3d240c48ee7c23183623ee04d1f2fc1840e71ffce3
MD5 42c7812dcb7a225fba2c9d95941fdbfa
BLAKE2b-256 e1c88471e64f8374fdb4177a69379d28f49f01638c7db2a750ffb44715de0720

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page