Skip to content

tosp/tospHome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tospHome

This is the new home for everything [tosp] related

Build Status

System Requirements

Virtual Environments

You will need to create a virtual environment in order to isolate all the packages that are required for the project. We provide instructions on how to do it with virtualenv

First find the path to your python 3.5 installation by running

$ which python3.5
PATH TO PYTHON 3.5

Then create the virtual environment like this. (We use different virtualenvironments for different functions, such as testing, development, production, and CI, each of them has different requirements, you should at least create an environment for development and one for testing.)

$ virtualenv --python='PATH TO PYTHON 3.5' /path/to/your/venv/NAME_OF_YOUR_ENV

We use environment variables to separate sensitive information and keys from the code, you should set the following ones.

DJANGO_SETTINGS_MODULE='tospHome.settings.development' //The last part depends on the environment you are on
SECRET_KEY='Generate one here. (http://www.miniwebtool.com/django-secret-key-generator/)'
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
DB_PORT

In order to set them in your virtualenv just go to /path/to/your/venv/NAME_OF_YOUR_ENV/bin/activate and in the section for deactivate add at the end

unset NAME_OF_ENV_VAR

And set the variable at the end of the file like this

export NAME_OF_ENV_VAR='VALUE OF VAR'

After you are finished you can activate your virtual environment by running

$ source /path/to/your/venv/NAME_OF_YOUR_ENV/bin/activate

And deactivate it just by running this command on the terminal

$ deactivate

Installing the Project Requirements

You will need to install different packages depending on the environment you are working on. For example if you are setting up the development environment you will need to run

$ pip install -r requirements/development.txt

Then install the npm required with

$ npm install

Running the project

Once you have finished the setup, you can run the project.

Run the migrations
$ python manage.py migrate
Start the development server
$ python manage.py runserver

After this you can go to your browser and go to http://localhost:8000, and you should be able to see the project running.

Thank you!!!

All your contributions are highly appreciated. You are awesome and we hope you have a great day.

About

This is the new home for everything [tosp] related

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors