|
GettingStarted
Getting started with Reversion.
Getting StartedReversion 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. InstallationTo install Reversion, follow these steps:
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 IntegrationTo 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 APIFor 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