Metadata-Version: 1.0
Name: django-versioning
Version: 0.7.4.2
Summary: Django-versioning allows you to version the data stored in django models, and stores only diff, not content copy.
Home-page: https://bitbucket.org/emacsway/django-versioning
Author: Ivan Zakrevsky
Author-email: ivzak@yandex.ru
License: BSD License
Description: ==================
        Django-Versioning
        ==================
        
        Django-versioning allows you to version the data stored in django models, and stores only diff, not content copy.
        
        Supports all field types excepts ManyToMany (currently).
        
        Forked from https://github.com/brosner/django-versioning
        
        Usage
        ======
        
        settings.py::
        
            MIDDLEWARE_CLASSES = [
                # ...
                "versioning.middleware.VersioningMiddleware",
                # ...
            ]
            # ...
            INSTALLED_APPS = [
                # ...
               'versioning',  # Should be after apps with versioned models
                # ...
            ]
        
        wiki/models.py::
        
            from django.db import models
            from django.contrib.auth.models import User
            import versioning
        
            class Article(models.Model):
                title = models.CharField()
                body = models.TextField()
                is_active = models.BooleanField()
                weight = models.IntegerField(blank=True, null=True)
                creator = models.ForeignKey(User, blank=True, null=True)
                
                class Meta:
                    permissions = (
                        ("wiki.browse_revision_article", "Can browse revisions"),
                        ("wiki.reapply_revision_article", "Can repply revision"),
                    )
        
            versioning.register(
                Article,
                ['title', 'body', 'is_active', 'weight', 'creator', ]
            )
        
        wiki/templates/wiki/article_detail.html::
        
            ...
            <a href="{% url versioning_revision_list content_type=contenttype_id object_id=article.pk %}">View the list of revisions.</a>
            ...
        
        If you have already existent content, to create a first revision, simple run::
        
            ./manage.py versioning_setup wiki.Article -f
        
        You can also view revisions in admin, by clicking "History" button on change object page.
        
Keywords: versioning revision model django changeset reversion
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
