{ "info": { "author": "Jakub Owczarski", "author_email": "jakub3279@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3" ], "description": "django-tracked-model\n====================\n\n**Simple django app for tracking db changes executed through orm. (Only\ntested on python3 and django-1.8.1)**\n\nUsage\n-----\n\n**Once installed (see ``Installation`` below), every change to tracked\nmodel will be recorded whenever ``save`` or ``delete`` is called.**\n\nTo include usefull information about circumstances of the changes use\n\n::\n\n model.save(request=request)\n\nor\n\n::\n\n model.save(track_token=token)\n\nSame goes for ``model.delete()``, where ``request`` is just django\n``HttpRequest`` instance, and ``token`` is result of\n``tracked_model.control.create_track_token(request)`` call.\n\nThis will store djagno user making changes along with ip, host, user\nagent, request path, request method, referer and request timestamp.\n\nTo access model's history, call it's ``tracked_model_history`` method\n\n::\n\n model.tracked_model_history()\n\nModel instance can be created from ``History`` instance by calling\n``materialize``\n\n::\n\n model = SomeModel.objects.create(attr='initial')\n model.attr = 'change 1'\n model.save()\n model.attr = 'change 2'\n model.save()\n\n model_initial_state = model.tracked_history().first().materialize()\n\nInstallation\n------------\n\n0. .. code:: sh\n\n $ pip install django-tracked-model\n\n1. Add ``tracked_model`` to ``INSTALLED_APPS`` in ``settings``.\n\n2. Synch db\n\n .. code:: sh\n\n $ python manage.py syncdb\n\n3. Mark model as trackable\n\n::\n\n from django.db import models\n from tracked_model.control import TrackedModelMixin as Tracked\n\n class MyModel(Tracked, models.Model):\n spam = models.IntegerField()\n egg = models.TextField()\n\nTests & mods\n------------\n\nIf for some weird reason you want to hack around, clone repo and install\nstuff from dev-reqs.txt\n\n.. code:: sh\n\n $ pip install -r dev-reqs.txt\n\nThere is a Makefile with some handy shortcuts e.g.\n\n.. code:: sh\n\n $ make test\n $ make qa\n\nPoke around Makefile for details", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ojake/django-tracked-model", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-tracked-model", "package_url": "https://pypi.org/project/django-tracked-model/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-tracked-model/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ojake/django-tracked-model" }, "release_url": "https://pypi.org/project/django-tracked-model/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Track changes to django models", "version": "0.1.2" }, "last_serial": 1539201, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "b68413d1f63c1a91e8947dd8fa19589f", "sha256": "92714239733cb8575e093ce6684d5d081c53fa195534b6e668d81ccd96c20c0a" }, "downloads": -1, "filename": "django-tracked-model-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b68413d1f63c1a91e8947dd8fa19589f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7311, "upload_time": "2015-05-08T16:50:18", "url": "https://files.pythonhosted.org/packages/ef/3c/4f5b9c6e39bd1db57c9ebf95876822f67088ff8660dfb6852974644968e6/django-tracked-model-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b68413d1f63c1a91e8947dd8fa19589f", "sha256": "92714239733cb8575e093ce6684d5d081c53fa195534b6e668d81ccd96c20c0a" }, "downloads": -1, "filename": "django-tracked-model-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b68413d1f63c1a91e8947dd8fa19589f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7311, "upload_time": "2015-05-08T16:50:18", "url": "https://files.pythonhosted.org/packages/ef/3c/4f5b9c6e39bd1db57c9ebf95876822f67088ff8660dfb6852974644968e6/django-tracked-model-0.1.2.tar.gz" } ] }