My favorites | Sign in
Project Logo
                
Search
for
Updated Oct 12, 2009 by david.et...@googlemail.com
Labels: Featured
GettingStarted  
Getting started with Reversion.

Getting Started

Reversion is an extension to the Django web framework that provides comprehensive version control facilities.

It can be easily added to your existing Django project with an absolute minimum of code changes.

Installation

To install Reversion, follow these steps:

  1. Checkout the latest Reversion release into your PYTHONPATH. The latest release can be found at http://django-reversion.googlecode.com/svn/tags/1.2/src/reversion.
  2. Add 'reversion' to your INSTALLED_APPS setting.
  3. Run the command manage.py syncdb.

The latest release of Reversion is designed to work with Django 1.1.1. If you have installed anything other than the latest version of Django, please check the CompatibleDjangoVersions page before downloading Reversion.

There are a number of alternative methods you can use when installing Reversion. Please check the InstallationMethods page for more information.

Admin Integration

To activate version control for a model, simply register it with a subclass of reversion.admin.VersionAdmin:

from django.contrib import admin
from reversion.admin import VersionAdmin
from yoursite.models import YourModel

class YourModelAdmin(VersionAdmin):
    """Admin settings go here."""

admin.site.register(YourModel, YourModelAdmin)

It's that simple!

Low-Level API

For most projects, simply activating the admin integration will satisfy all your version-control needs. However, Reversion comes with a lower-level API that allows you to manage versions within your own code. Please see the LowLevelAPI documentation for more information.



Sign in to add a comment
Hosted by Google Code