Pip and virtualenv are used the manage the python dependencies for the project.
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
Node is used in this project for javascript task running such as compiling SASS and minifying javascript.
-
Install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
After installation is complete, you must close your terminal and reopen it to use
nvm
. -
Install the required version of node (0.12.7)
nvm install 0.12.7
Any time you need to use this version of node (every time you want to work on this project) you must run:
nvm use 0.12.7
-
Install some of the required global dependencies:
npm install -g grunt-cli npm install -g bower
-
Navigate to a common directory where you want to store your virtual environments and github projects, below is a sample structure:
../development/ venvs/ git/
-
Navigate into the
git/
directory and clone this project if you haven't done so alreadygit clone https://github.com/YeomansIII/healthycookingfortoday.git
-
Navigate into the
venvs/
directory and runvirtualenv healthycooking
-
Start the new virtual environment
source healthycooking/bin/activate
-
Move into your
git/healthycookingfortoday/
directory and install the pip dependenciessudo apt-get update && sudo apt-get install python-dev libldap2-dev libssl-dev libjpeg8-dev libsasl2-dev pip install -r requirements.txt
This installs all of the required dependencies for the project which are listed in the
requirements.txt
file. -
Install the required node dependencies and bower components, this can take a few minutes
npm install bower install
-
Make migrations for the sqllite database, move into
django-project/
python manage.py makemigrations python manage.py makemigrations blogger python manage.py migrate
You must run these any time you make model changes
-
You are now ready to run the project! Move into the
django-project/
directory and run:python manage.py gruntserver
-
Navigate to
localhost:8000
in your browser :)
Every time you want to work on the project you will need to remember to activate the appropriate node version and the healthycooking virtual environment:
nvm use 0.12.7
source ~/development/venvs/healthycooking/bin/activate