My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members
Featured
Downloads

django-siteupdate

Thanks for downloading django-siteupdate! This is a simple Django admin interface for updating a Django site. The following features are implemented:

  • Run simple site updates from the Django admin
  • Database driven log entries for all siteupdates
  • Process your update by a simple server command (for example a bash script)
  • Posibility to execute a post process command (for example to restart apache or touch your wsgi file)

Installation

Installation of this package is quite simple; If you have downloaded it just run::

python setup.py install

If you need to download it just use easy_install or PIP::

easy_install django-siteupdate

To use the package in your Django application add 'siteupdate' to your INSTALLED_APPS in your settings.py

After that please run manage.py syncdb to create the needed tables

Configuration

There are 3 settings available to set:

SITEUPDATE_SHELL

The shell to execute your script with, by default it's /bin/sh

SITEUPDATE_COMMAND

The update command to run, this can be just a plain command or the location of a script. All output and errors will be availble in the log entry.

SITEUPDATE_POSTCOMMAND

The post update command, this can be used for restarting apache or touching your .wsgi file. This script is not required but recommended for restarting your server. Logging is disabled for this command

Examples

Example of a update script

#!/bin/bash

cd `dirname $0` && pwd 
svn up
python2.5 manage.py syncdb
echo "Databased synced and using latest version"
echo "Restarting Apache..."

Example of a post update script

cd `dirname $0` && pwd 
touch ../website.wsgi
Powered by Google Project Hosting