Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

a generic fabric utility class for django projects

Project Description

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:

project-dir/
  venv/ # virtualenv
  project-package/
  manage.py
  fabfile.py

Installation

Run pip install django-fabric

Usage

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:

django-fabric-init

Basic manual setup

Create a fabfile.py 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 = ['server1.example.com']

site = App(
    project_paths={
        'prod': '/var/www/example_site',
    },
    urls={
        'prod': 'http://example.com'
    },
    restart_command={
        'prod': 'restart prod'
    },
    project_package='example',
    test_settings='example.settings.test',
)

deploy = task(site.deploy)
test = task(site.test)
Release History

Release History

This version
History Node

2.1.0

History Node

2.0.2

History Node

2.0.1

History Node

2.0.0

History Node

1.5.3

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.1

History Node

1.4.0

History Node

1.3.2

History Node

1.3.1

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0.1

History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_fabric-2.1.0-py2-none-any.whl (12.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jul 18, 2015
django-fabric-2.1.0.tar.gz (7.5 kB) Copy SHA256 Checksum SHA256 Source Jul 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting