{ "info": { "author": "Hugo Rodger-Brown", "author_email": "hugo@yunojuno.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django User Timeline\n====================\n\nDjango app for displaying a timeline of events.\n\nBackground\n----------\n\nThis is a very simple Django app that stores 'events' against a User object,\nproviding a timeline of user events. It's very open, the events don't relate\nto anything concrete (this isn't a model auditing app, although there is an\noptional ``GenericForeignKey`` on the ``Event`` model that you _can_ use if you\nwish) - it's just a list of timestamped objects that can be used to track\nuser interactions. Each event in the timeline has a ``category`` and a\n``message`` field, along with a JSON field that can be used to store\nunstructured additional data. An event can optionally be related to another\nmodel via a generic foreign key.\n\nThe rendering of events is up to you - there is no default.\n\nInstallation\n------------\n\nThe project is available through PyPI as ``django-user-timeline``:\n\n.. code::\n\n $ pip install django-user-timeline\n\nAnd the main package itself is just ``timeline``:\n\n.. code:: python\n\n >>> from timeline import models, views, urls, admin\n\nUsage\n-----\n\nWhenever something interesting happens, add an event. That's it.\n\n.. code:: python\n\n >>> from .models import Product, add_to_basket\n >>> from timeline.models import TimelineEvent\n >>> def add_product(request, product_id):\n ... \"\"\"View function to add product to user's basket.\"\"\"\n ... product = get_object_or_404(Product, id=id)\n ... add_to_basket(request.user, product)\n ... event = TimelineEvent.objects.create_event(\n ... user=request.user,\n ... category='add_to_basket',\n ... message='You added %s to your basket' % product,\n ... content_object=product,\n ... context = {\n ... \"product_id\": product_id,\n ... \"price_paid\": 10.00,\n ... \"on_sale\": False\n ... }\n ... )\n ... return HttpResponse(\"...\")\n\nHow you use the timeline is up to you - display it on the site, use\nit for reporting, etc. A user's timeline is available directly via\nthe ``related_name`` property of ``timeline``:\n\n.. code:: python\n\n >>> from django.contrib.auth.models import User\n >>> from timeline.models import TimelineEvent\n >>> user = User.objects.get(id=1)\n >>> assert user.timeline.all() == TimelineEvent.objects.filter(user=user)\n\nTests\n-----\n\nTests are run using ``tox``, and are run on commit pushes through Travis-CI.\n\nContributing\n------------\n\nStandard GH rules apply: clone the repo to your own account, create a branch, make sure you update the tests, and submit a pull request.\n\nStatus\n------\n\nThis is currently a placeholder for an application that is in development (hence 0.0.0).", "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/hugorodgerbrown/django-user-timeline", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-user-timeline", "package_url": "https://pypi.org/project/django-user-timeline/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-user-timeline/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hugorodgerbrown/django-user-timeline" }, "release_url": "https://pypi.org/project/django-user-timeline/0.0.0/", "requires_dist": null, "requires_python": null, "summary": "Django app for managing a timeline of events.", "version": "0.0.0" }, "last_serial": 2430545, "releases": { "0.0.0": [] }, "urls": [] }