A custom template for initializing a new Django project the Data Desk way.
Switch branches/tags
Nothing to show
Clone or download
Latest commit b9eb644 Feb 17, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
chef remove template_postgis since it's not necessary and upgrade postgres… Feb 18, 2017
fabfile update to a 16.04LTS AMI Feb 18, 2017
project_name fully pep8ed Feb 18, 2017
templates A repo reborn Jun 12, 2015
toolbox fully pep8ed Feb 18, 2017
.coveragerc A repo reborn Jun 12, 2015
.gitignore A repo reborn Jun 12, 2015
.travis.yml urls upgrade to 1.9 style Jul 5, 2016
README.md Update README.md Jul 8, 2016
manage.py A repo reborn Jun 12, 2015
requirements.txt urls upgrade to 1.9 style Jul 5, 2016
setup.py Test trim Jul 5, 2016

README.md

     _  _                                    _        _     _                  _      _
  __| |(_)__ _ _ _  __ _ ___   _ __ _ _ ___ (_)___ __| |_  | |_ ___ _ __  _ __| |__ _| |_ ___
 / _` || / _` | ' \/ _` / _ \ | '_ \ '_/ _ \| / -_) _|  _| |  _/ -_) '  \| '_ \ / _` |  _/ -_)
 \__,_|/ \__,_|_||_\__, \___/ | .__/_| \___// \___\__|\__|  \__\___|_|_|_| .__/_\__,_|\__\___|
     |__/          |___/      |_|         |__/                           |_|

A custom template for initializing a new Django project the Data Desk way.

Uses the built-in Django startproject templating system. Includes a number of small modifications favored by the Los Angeles Times Data Desk. Assumes you already have experience hacking around on Django and PostGIS.

Still experimental, so don't get your hopes up.

Build Status Coverage Status

Features

Requirements

Getting started

Create a virtual enviroment to work inside.

$ virtualenv my-environment

Jump in and turn it on.

$ cd my-environment
$ . bin/activate

Install Django.

$ pip install "django"

Create a new Git repository.

$ git init repo

Download and install a project in there using this template.

$ django-admin.py startproject --extension=py,.gitignore --template=https://github.com/datadesk/django-project-template/archive/master.zip project repo

Now that the template has landed, jump in and install the project's Python dependencies.

$ cd repo
$ pip install -r requirements.txt

Generate a secret key.

$ fab makesecret

Copy the key. Open the settings file and drop it near the top. While you're there, you can also customize any of the other top level configuration options.

$ vim project/settings.py

Create a PostGIS database to connect with. This may vary depending on your PostGIS configuration.

The command below assumes you have it running and want to make the database with a user named postgres. Please modify it to suit your needs. If you don't have PostGIS installed, try following the GeoDjango installation instructions.

$ createdb -U postgres -E UTF8 -T template_postgis mydatabasename

Make a copy of the development settings template.

$ cp project/settings_dev.template project/settings_dev.py

Open it and put in the credentials for the database you just made.

$ vim project/settings_dev.py

Sync the database.

$ python manage.py syncdb

Fire up the test server.

$ fab rs

Get to work. Once you have something worth saving you can replace this README with a description of your new project.