Skip to content
Charlon Palacay edited this page Jan 9, 2014 · 23 revisions

Cras mattis consectetur purus sit amet fermentum. Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec ullamcorper nulla non metus auctor fringilla.

Setup

  • Virtual environments
  • Project scaffold
  • Version control

Virtual environments

Make sure that virtualenv is installed. You may need to install nodeenv for running Node applications in a virtual container. For this project template, LessCSS is used and compiled server-side using Node. Install nodeenv if you don't want to install the LessCSS compiler globally.

Virtualenv:

$ virtualenv [repo-name]$ cd [repo-name]$ source bin/activate

Note: I typically name my virtualenv the same as my repository in Github. This allows for consistency if collaborating with others or just having to clone the repo on another machine.

Nodeenv:

$ pip install nodeenv$ nodeenv -p$ npm install lessProject scaffold

Concepts: Adaptive design, mobile-first, RESS, responsive web design - whatever you want to call it! Includes: Bootstrap3/Normalize, Django Compressor, MobileESP, LessCSS

Install Django:

$ pip install django

Start project using template

$ django-admin.py startproject --template=https://github.com/charlon/django-scaffold-template/archive/master.zip --extension=py,in,html [project_name]

Install dependencies:

$ cd [project_name]$ pip install -r requirements.txt

Run server (using local settings):

$ cd [project_name]$ python manage.py runserver --settings=[project_name].settings.local 0.0.0.0:8000

At this point, you may want to start version controlling your project (see Version Control).

Install apps

$ python manage.py startapp [app_name]
Clone this wiki locally