skip to navigation
skip to content

django-fabric 2.0.1

a generic fabric utility class for django projects

Latest Version: 2.1.0

django-fabric is written to make writing fabfiles for django projects easier and faster. It contains the basic stuff one would expect from a django setup with git and virtualenv. The code expects the project to have a certain structure as seen below. It is possible to customize the activation of the virtualenvironment. .. code-block:

  venv/ # virtualenv


Run pip install django-fabric


There is two options to get get a basic setup, both will make you able to run fab deploy:prod and fab test.

Init script

There is a init script that will guide you through the generation of a basic fabfile that utilises django-fabric. Run it with the command .. code-block:


Basic manual setup

Create a in your project directory. You can see example of a fabfile below. If you run into problems with settings where fabric cannot locate settings add sys.path.append(os.path.dirname(__file__)) to your fabfile.

Here is an example of an fabfile .. code-block:

from fabric.decorators import task
from fabric.state import env
from django_fabric import App

env.user = 'web'
env.hosts = ['']

site = App(
        'prod': '/var/www/example_site',
        'prod': ''
        'prod': 'restart prod'

deploy = task(site.deploy)
test = task(site.test)
File Type Py Version Uploaded on Size
django-fabric-2.0.1.tar.gz (md5) Source 2014-04-17 7KB
django_fabric-2.0.1-py2-none-any.whl (md5) Python Wheel 2.7 2014-04-17 11KB