Setup and Usage Instructions

Setup Instructions


If you want to use Vagrant then use the Vagrant Instructions. Otherwise, continue with these instructions.

Before you begin make sure you’ve setup and installed Virtualenvwrapper.

Change the directory to where you want keep your django projects.

$ cd ~/Sites

In the same directory run the following command to setup a virtualenv for your new site.

$ BRANCH=master PROJECT_NAME=example
$ mkvirtualenv --no-site-packages --distribute $PROJECT_NAME
$ pip install django

Create your Django Base Site. The following will create a new project called “$PROJECT_NAME”.

$ startproject $PROJECT_NAME --template=$

Install the base requirements and development requirements.

$ pip install -r config/requirements/dev.txt

Setup your python virtual environment to load environment variables and switch you to the project root.

$ echo `pwd` > $VIRTUAL_ENV/.project
$ echo 'cdproject' >> $VIRTUAL_ENV/bin/postactivate

Remove all unnecessary example config and template files and create a config/settings/ settings file:

$ python config/
$ make clean

Setup your database:

$ chmod +x
$ ./ migrate

At this point your base site should be setup and you can now run your dev server.

$ ./ runserver


Running the development server

After following the Setup Instructions you can work on your project again by doing the following.

$ workon example
$ ./ runserver

Editing the SCSS/CSS

First from the root of the project install gulp and the node requirements. This requires that your first install node.

$ npm install -g gulp
$ npm install

Then you can run gulp which will watch for changes to your SCSS files (e.g. static/scss/base.scss).

$ gulp