Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-fab-templates

How to install django-fab-templates

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-fab-templates
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.2 Available View build log
0.1.1 Available View build log
0.1 Available View build log
Windows (64-bit)
0.1.2 Available View build log
0.1.1 Available View build log
0.1 Available View build log
Mac OS X (10.5+)
0.1.2 Available View build log
0.1.1 Available View build log
0.1 Available View build log
Linux (32-bit)
0.1.2 Available View build log
0.1.1 Available View build log
0.1 Available View build log
Linux (64-bit)
0.1.2 Available View build log
0.1.1 Available View build log
0.1 Available View build log
 
License
MIT
Lastest release
version 0.1.2 on Jun 1st, 2011

django-fab-templates is set of start templates for Django projects. All of these templates support automated Django project deployment with help of Fabric. Feel free to use them as is or tweak them to fit your needs.

Kudos to:

Please submit bugs and improvements as GitHub issues or send them to dmitry.guyvoronsky@gmail.com.

Quick Start

Here is quick primer on creation of new Django project (mysql+south+html5boilerplate) that supports deployment to vagrant-managed virtual box.

First, install everything:

$ pip install django-fab-templates
$ gem install vagrant
$ vagrant box add base http://files.vagrantup.com/lucid32.box

Then create new Django project, boot and configure vagrant box:

$ paster create -t vagrant_project my_project
$ cd my_project
$ vagrant up

Finally set up your project on virtual vagrant box and test it:

$ fab vagrant setup
$ curl -I http://localhost:8080/

Features

All project templates have the following in common:

  • Automated deployment with help of Fabric command-line tool is supported
  • Excellent html5 boilerplate template is used as a base for html+css+js
  • SQLite and MySQL are used as default db backends
  • Database scheme and data migrations are managed by South
  • Multiple configurations (development/staging/production) and local setting overrides are supported

The following major fab commands are supported in all projects:

  • Webserver manipulation
    • apache_restart - Restarts apache
    • apache_start - Starts apache
    • apache_stop - Stops apache
    • maintenance_off - Turn maintenance mode off
    • maintenance_on - Turn maintenance mode on
  • Database
    • create_database - Create database and db user
    • drop_database - Create database and db user
    • populate_database - Create initial database scheme and load initial data
    • migrate - Migrate database scheme and data
vagrant_project

This project template simplifies Django project development and testing on vagrant-managed virtual box. It uses 32-bit Ubuntu 10.04.2 LTS (Lucid Lynx) release (codename lucid32). Of course you operating system of your choice, just keep in mind you may need to tweak Chef settings in Vagrantfile.

Hint

Vagrant is an amazing tool for managing virtual machines via a simple to use command line interface. With a simple vagrant up you can be working in a clean environment based on a standard template. You will need to install vagrant, download lucid32 box and boot up vagrant by running:

$ gem install vagrant
$ vagrant box add base http://files.vagrantup.com/lucid32.box
$ vagrant init
$ vagrant up

Please refer to Getting Started with Vagrant manual for details.

The following fab commands are supported in addition to common ones:

  • General commands
    • setup - Setup a fresh virtualenv, install everything we need
    • destroy_world - Removes everything

Example:

$ paster create -t vagrant_project my_project
$ cd my_project
$ vagrant up
$ fab vagrant setup

Dependencies

django-fab-templates requires the following python packages:

  • setuptools - no comments
  • PasteScript - pluggable command-line frontend, including commands to setup package file layouts
  • Cheetah - a template engine and code generation tool
  • Fabric - command-line automation tool
  • Jinja2 - modern and designer friendly templating language for Python

Installation

From pypi:

$ pip install django-fab-templates

or:

$ easy_install django-fab-templates

or clone from GitHub and install manually:

$ git clone git://github.com/dreamiurg/django-fab-templates.git
$ cd django-fab-templates
$ sudo python setup.py install

Usage

To see list of available project templates:

$ paster create --list-templates

To generate Django project template:

$ paster create -t <template_name> <project_name>

Subscribe to package updates

Last updated Jun 1st, 2011

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.