django-versioning 0.7.5.0

Django-versioning allows you to version the data stored in django models, and stores only diff, not content copy.

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).

Django-versioning as small as possible, and follows the KISS principle.

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.

Forked from https://github.com/brosner/django-versioning , Thanks to Brian Rosner.

BSD License

Author

Ivan Zakrevsky

Pip

django-versioning==0.7.5.0

Classifiers

  • Topic :: Software Development :: Libraries :: Python Modules
  • Topic :: Software Development :: Libraries :: Application Frameworks
  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: BSD License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 5 - Production/Stable
File Type Python Version Uploaded On Downloads
django-versioning-0.7.5.0.tar.gz Source March 16, 2014 909
Version Release Date
0.7.5.0 March 16, 2014
0.7.4.9 March 16, 2014
0.7.4.8 March 16, 2014
0.7.4.7 March 16, 2014
0.7.4.6 March 14, 2014
0.7.4.5 March 13, 2014
0.7.4.4 March 13, 2014
0.7.4.3 March 13, 2014
0.7.4.2 March 4, 2014
0.7.4.1 Feb. 16, 2014
0.7.4 June 17, 2013
0.7.3 April 27, 2013
0.7.2 April 11, 2013
0.7.1 March 24, 2013
0.7 Nov. 4, 2014
Date Package Version Action
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.1 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.3 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.2 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.5 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.4 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.7 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.6 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.9 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4.8 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.1 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.3 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.2 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.4 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning 0.7.5.0 Release Created
Nov. 4, 2014, 2:02 p.m. django-versioning Package Created