{ "info": { "author": "Raymond Penners", "author_email": "raymond.penners@intenct.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=============================\nWelcome to django-actistream!\n=============================\n\n.. image:: https://badge.fury.io/py/django-actistream.png\n :target: http://badge.fury.io/py/django-actistream\n\n.. image:: https://travis-ci.org/pennersr/django-actistream.png\n :target: http://travis-ci.org/pennersr/django-actistream\n\n.. image:: https://img.shields.io/pypi/v/django-actistream.svg\n :target: https://pypi.python.org/pypi/django-actistream\n\n.. image:: https://coveralls.io/repos/pennersr/django-actistream/badge.png?branch=master&_\n :alt: Coverage Status\n :target: https://coveralls.io/r/pennersr/django-actistream\n\n.. image:: https://pennersr.github.io/img/bitcoin-badge.svg\n :target: https://blockchain.info/address/1AJXuBMPHkaDCNX2rwAy34bGgs7hmrePEr\n\nSmall core for dealing with activities & notifications.\n\nSource code\n http://github.com/pennersr/django-actistream\n\n\nRationale\n=========\n\nThere are quite some Django apps for dealing with activities & notifications,\nyet none match my expectations/requirements:\n\n- Action URLs: they do not belong in the database/models, as your database\n records will outlive the URL routing configuration.\n\n- Texts & descriptions: these neither belong in the database/models. If you need to change\n the wording or correct a typ-o, you should not have to go over all existing records to\n make the change as well. But more importantly, you need to cater for internationalization,\n so these belong in templates where e.g. ``{% blocktrans %}`` can be used. \n\n- Views: any views that are offered out of the box are not going to match your requirements,\n and won't fit in with your single page application.\n\n- Project specific data: `actistream` allows for storing additional project\n specific data per activity, and flagging activities in a performant manner.\n\nConcepts\n========\n\nAn activity is about an actor, involved in an action of a certain activity type, relating an action object to a target. For example:\n\n- *John* (=the actor) has *posted a comment* (=the activity type) stating *\"I don't get it!\"* (=the action object) on the blog post titled *\"actistream for dummies\"* (the target).\n\nA notice is an action addressed to a user. So, in Jane's inbox you may want to display that John posted that comment. For that purpose, create a ``Notice`` relating the above activity to Jane.\n\nQuick Start\n===========\n\nSuppose you have a an app called ``blog`` dealing with posts and comments.\nCreate a file named ``blog/activities.py``, containing::\n\n from actistream.types import ActivityWrapper, ActivityType\n \n class CommentPosted(ActivityType):\n verbose_name = 'Comment posted'\n \n class Wrapper(ActivityWrapper):\n \"\"\"\n Wraps the generic ``Activity`` model, expose any helper methods\n you see fit. Notice that the action URL is not stored in the \n database.\n \"\"\"\n\n def get_action_url(self):\n return self.activity.action_object.get_absolute_url()\n \n def is_active(self):\n \"\"\"\n Completely optional, but just to show that it handles\n the case where things get deleted.\n \"\"\"\n comment = self.activity.action_object\n return not comment.post.is_deleted\n\n\nGiven the above, whenever a new comment is created, do::\n\n from blog.activities import CommentPosted\n\n def some_view(request):\n ...\n activity = CommentPosted.create(\n target=post, # The post that gets commented\n actor=self.request.user,\n action_object=comment, # The newly posted comment\n )\n\nTo notice users about this activity, do::\n\n from actistream.models import Notice\n\n notice_recipients = User.objects.filter(...)\n Notice.objects.send(\n activity,\n notice_recipients)\n\nNotices need to be turned into emails. For that purpose you'll need to setup a few templates::\n\n blog/activities/commentposted_subject.txt\n blog/activities/commentposted_message.txt\n blog/activities/commentposted_message.html\n\nOnly one of ``.txt`` or ``.html`` is required, both are allowed for combined\ntext and HTML mails.\n\nFor turning an activity into an HTML snippet, e.g. to be displayed in a feed, do::\n\n {% load actistream %}\n {% render_activity activity %}\n\nThis will try to find a template named::\n\n blog/activities/commentposted_detail.html\n\nWhich could look someting like::\n\n {{ activity.actor }} posted a comment to\n {{ activity.action_object.post }}.\n\n\nStatus\n======\n\nRunning in production since 2012, released as open source in september 2016.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pennersr/django-actistream", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-actistream", "package_url": "https://pypi.org/project/django-actistream/", "platform": "any", "project_url": "https://pypi.org/project/django-actistream/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/pennersr/django-actistream" }, "release_url": "https://pypi.org/project/django-actistream/1.0.6/", "requires_dist": null, "requires_python": null, "summary": "Activities & notifications for Django", "version": "1.0.6" }, "last_serial": 2849778, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b004ee9d5168c0a717d4fe512eccf47d", "sha256": "9846450f95c1ca6509dc0815478869b8f085f0c25dd67a3032fb05db8fb94911" }, "downloads": -1, "filename": "django-actistream-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b004ee9d5168c0a717d4fe512eccf47d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10613, "upload_time": "2016-09-17T08:25:06", "url": "https://files.pythonhosted.org/packages/30/b7/1287659e6e94d9ade70ec53a4a284f8fcd199ab3c306bb7c2efadf86d906/django-actistream-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "19bae71bbe3ad25b8036c474c8c750a0", "sha256": "f765bd34ed3b4a820669f37f1227ace00e83021761b522616d5412b8f6676899" }, "downloads": -1, "filename": "django-actistream-1.0.1.tar.gz", "has_sig": false, "md5_digest": "19bae71bbe3ad25b8036c474c8c750a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10643, "upload_time": "2016-09-20T13:06:46", "url": "https://files.pythonhosted.org/packages/bb/47/6965f78c61a5d0c583544c5f87c99dde412016ad110d1c3270f0ec157f37/django-actistream-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "dd356786edd40e2351fc7b4ce738a22e", "sha256": "d3a84d250a849065c8400fe16e6a00924129c8da9ec85c648792a5547331c9f2" }, "downloads": -1, "filename": "django-actistream-1.0.2.tar.gz", "has_sig": false, "md5_digest": "dd356786edd40e2351fc7b4ce738a22e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10735, "upload_time": "2016-09-22T13:54:05", "url": "https://files.pythonhosted.org/packages/42/ac/7dd74c337d8aea3c3cb186cc4a6dbebda2e087a76d883a25cbd30dfed147/django-actistream-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "fe6be7f2934c3a8ed83d45ddb1ca71f5", "sha256": "fc68b93758e97daacd025206f7119eec4aaee32e830b66a12a35a9561621f751" }, "downloads": -1, "filename": "django-actistream-1.0.3.tar.gz", "has_sig": false, "md5_digest": "fe6be7f2934c3a8ed83d45ddb1ca71f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10778, "upload_time": "2016-09-22T14:09:07", "url": "https://files.pythonhosted.org/packages/e6/bd/ee3db5134b14a9f4caba380ff48df0fd4792a4b8a730806618588470d382/django-actistream-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "4464484769a3f84f1399aaf201e31600", "sha256": "e074702fb4e15a1b4c5ccedbb74af0d6ca7683606a3ffabcfe5831ce581ee750" }, "downloads": -1, "filename": "django-actistream-1.0.4.tar.gz", "has_sig": false, "md5_digest": "4464484769a3f84f1399aaf201e31600", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10860, "upload_time": "2016-11-25T11:57:58", "url": "https://files.pythonhosted.org/packages/c3/4a/47ab456a8502e6d16fa549f9b2d423fd6cfc9a4ca59782432322bbfd5d9f/django-actistream-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "aa3390abaa76c13297db7cbdd57bae72", "sha256": "a0dc4a554e9342cf21badf0f71f20befe992c970570495b6f874e80aaf77a32e" }, "downloads": -1, "filename": "django-actistream-1.0.5.tar.gz", "has_sig": false, "md5_digest": "aa3390abaa76c13297db7cbdd57bae72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11018, "upload_time": "2017-02-27T17:02:18", "url": "https://files.pythonhosted.org/packages/af/2e/fbca341f524177bdd296e1e147a43de72a70524d0558d72428267c81d11f/django-actistream-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "81cb742acc3e5c0d7352616c12ebae11", "sha256": "f9a34bbfd0fbfd2f53e443f63640db3dc60ae818c570636fdadce65bb2acdbf2" }, "downloads": -1, "filename": "django-actistream-1.0.6.tar.gz", "has_sig": false, "md5_digest": "81cb742acc3e5c0d7352616c12ebae11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11033, "upload_time": "2017-05-03T19:00:22", "url": "https://files.pythonhosted.org/packages/8c/e2/63efbc5f84845e07ef5199eb977e4a6ef162bf2c17809ba57d72735a77c5/django-actistream-1.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81cb742acc3e5c0d7352616c12ebae11", "sha256": "f9a34bbfd0fbfd2f53e443f63640db3dc60ae818c570636fdadce65bb2acdbf2" }, "downloads": -1, "filename": "django-actistream-1.0.6.tar.gz", "has_sig": false, "md5_digest": "81cb742acc3e5c0d7352616c12ebae11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11033, "upload_time": "2017-05-03T19:00:22", "url": "https://files.pythonhosted.org/packages/8c/e2/63efbc5f84845e07ef5199eb977e4a6ef162bf2c17809ba57d72735a77c5/django-actistream-1.0.6.tar.gz" } ] }