Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Build out a static version of your website.

Project description


Build out a static version of your django project and deploy it using ftp, ssh or on your localhost.

But at first … if you like this tool and the idea behind, feel free to fork it, make pull requests and write issues.

1. Installation

1.1. Requirements

1.1.1. On Ubuntu

If you’re using Ubuntu this should work:

sudo pip install django-statify

Additionally, you need the python driver for your selected database:

sudo aptitude python-psycopg2 or sudo aptitude install python-mysql

This will your database’s driver globally.

1.1.2. On Mac OS X

sudo pip install django-statify (see above at ubuntu)

1.2. Database

I recommend using SQLite, MySQL or PostgreSQL.

2. Configuration

Add the following app to your INSTALLED_APPS.


Now add

url(r'^', include('statify.urls'))

to your and run

python syncdb --all

At last you have to set the current host at your Sites in the Admin Interface.

Default there is an exmaple host like:

Domain name:
Display name: Domain

this should be something like this

Domain name: Your current host, e.g.
Display name: Localhost or something else

The domain name is important because of the internal url validation.

2.1. Required settings


This is your settings file for the release.



It should looks like the following example:

# -*- coding: utf-8 -*-

# Project imports
from conf.settings import *

DEBUG = False




IF you are using django-cms you have to set this True:


Now your CMS sites will be automatically saved in internal urls.


The project dir should be the absolute path to your django project, where your is stored.


os.path.join(os.path.dirname(os.path.abspath(__file__)), '../')`


The upload path is relative to the MEDIA_ROOT. There will be stored all release archives. This should be always an absolute path.




The listed folders will be ignored on release statics. Optional I recommend to use django-pipeline for your assets like css, javascript and images.


[u'admin', u'statify', u'tmp', u'root']


If you need some root files like robots.txt or crossdomain.xml you are able to store these files in this path. On release these files will be moved to the root of the final htdocs.


os.path.join(settings.MEDIA_ROOT, 'root')


This setting is important for development. It should be overwritten in your build settings to ‘/’.


settings.STATIC_URL + 'root/'

3. Using

3.1. URLs

3.1.1. Register internal urls

You can register internal url’s using the django admin backend.

Alternative you can register urls automatically by adding one of the below methods to your model classes.

The following example is for an single URL:

def statify_url(self):
    return u'/%s/' % self.url_field

or you can register more then one URL for a Model with the following example:

def statify_urls(self):
    url_list = list()
    url_list.append('/%s/' % self.locale)

    return url_list

The backend will validate the url on save. Only valid urls will be rendered. This is important because only valid urls will be rendered on release.

3.1.2. Register external urls

If you need some external content rendered to your site, you are able to register external urls. Use the target path to point the rendered file in your final htdocs folder.

3.2. Release

3.2.1. Create new release

Using the django admin interface you can create new releases by clicking the button “Create new release” at the release overview. After clicking you will see a loader. After the release is done the current page will reload automatically.

3.3. Deployment

3.3.1. Manage deployment hosts


3.3.2. Run deployment

There are two ways to deploy an release. First you have to click at the release overview on “Deploy this release”. Afterwards you have to select an deployment host and click on “Run deployment”.

Alternative you can navigate to the detail view of an release and do the same like below by clicking on “Run deployment”.

4. Roadmap

Version 1.0

  • Execute releases and deployments using django management commands
  • Integrate logging for releases and deployments
  • Extend deployment hosts to some cloud services (S3, etc.)
  • django CMS support

5. Changelog

Version 0.2.0

  • Added django-cms support (in BETA)
  • Some locale fixes
  • Some bugfixes
  • Updated

Version 0.1.9

  • Updated
  • Some locale fixes
  • Some bugfixes

Version 0.1.8

  • Updated
  • Some bugfixes

Version 0.1.7

  • Updated

Version 0.1.6

  • Added german locale
  • Updated
  • Some bugfixes

Version 0.1.5

  • Added API / Method to register urls from Models
  • Updated
  • Some bugfixes

Version 0.1.4

  • Updated
  • Some bugfixes

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-statify-0.2.0.tar.gz (25.2 kB) Copy SHA256 hash SHA256 Source None Apr 24, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page