{
"info": {
"author": "Martin Brochhaus",
"author_email": "mbrochh@gmail.com",
"bugtrack_url": null,
"classifiers": [],
"description": "Django Object Events\n====================\n\nGeneric app for creating events that can be shown to the user in a\nnotifications list.\n\nThink about Facebook. You got all kinds of events:\n\n* User friends / unfriends user\n* User posts a status update\n* User likes something\n\nAll these things happen to a user and they happen on a certain object in the\ndatabase (his profile, a facebook page etc.).\n\nIf you wanted to create a timeline of events, you would have to query a ton\nof different tables, then sort them via date, which would probably be near\nimpossible to solve via the Django ORM in a performant way.\n\nWith Django Object Events you can emit any kind of event and just drop it into\nthe ``object_event`` table. It has a foreign key to the afected user and\ntwo more generic foreign keys: One for the object that caused the event and one\nfor the object that the event is about.\n\nThe object that caused the event could be another user writing a comment or\nit could be a highscore entry reaching a certain value.\n\nAccoring to the two examples above, the object that the event is about would be\nthe Comment object or the Highscore object respectively. This gives you the\nchance to render a link to that object using it's ``get_absolute_url`` method.\n\nPrerequisites\n-------------\n\nYou need at least the following packages in your virtualenv:\n\n* Django 1.4\n* South\n* Django Mailer\n\n\nInstallation\n------------\n\nTo get the latest stable release from PyPi::\n\n $ pip install django-object-events\n\nTo get the latest commit from GitHub::\n\n $ pip install -e git://github.com/bitmazk/django-object-events.git#egg=object_events\n\nAdd the app to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = [\n ...\n 'object_events',\n ]\n\nInclude the app's urls::\n\n url(r'^notifications/', include('object_events.urls')),\n\nRun the south migrations to create the app's database tables::\n\n $ ./manage.py migrate object_events\n\n\nUsage\n-----\n\nIf you want to use this app without sending event notifications you don't have\nto create settings or stuff. Simply use it, it's intuitive =)\n\nBasically it's all about adding the right template tag::\n\n {% load object_events_tags %}\n {% render_notifications 3 %}\n\nThen create some events. You might want to create a notification in your\nviews, your forms or via signals. An example::\n\n @receiver(comment_was_posted)\n def comment_was_posted_signal_handler(sender, comment, request, **kwargs):\n \"\"\"Creates a notification for new comments.\"\"\"\n ObjectEvent.create_event(\n user=comment.user, event_type='comment',\n content_object=comment,\n event_content_object=comment.content_object,\n additional_text=_('(Comment posted)'),\n )\n\nSending emails\n++++++++++++++\n\nFor email support make sure to install ``django-mailer`` (see requirements.txt)\n\nMake sure to add all email-related settings::\n\n ADMINS = (('YOUR_NAME', 'YOUR_EMAIL'), )\n FROM_EMAIL = ADMINS[0][1]\n\n MAILER_EMAIL_BACKEND = 'django_libs.test_email_backend.EmailBackend'\n TEST_EMAIL_BACKEND_RECIPIENTS = ADMINS\n\n EMAIL_HOST = 'smtp.gmail.com'\n EMAIL_HOST_USER = FROM_EMAIL\n EMAIL_HOST_PASSWORD = \"YOUR_PASSWORD\"\n EMAIL_PORT = 587\n\n DEFAULT_FROM_EMAIL = FROM_EMAIL\n SERVER_EMAIL = FROM_EMAIL\n EMAIL_USE_TLS = True\n\nOf course, change it to your email address and your email server settings.\n\nSince the app is using intervals in sending email notifications we need to find\nall users, which should retrieve fresh mail notifications. For that purpose\ntake a look at the setting ``OBJECT_EVENTS_USER_AGGREGATION_CLASS`` right\nbelow.\n\nNow, back to me. If you already created or are about to create a custom profile\nmodel with a key to Django's User model and an interval field, which provides\nthese four options (realtime, daily, weekly, monthly), you can easily use our\npredefined class ``object_events.models.UserAggregation``.\n\nUse this profile as the general user profile (see setting AUTH_PROFILE_MODULE).\n\nIf you want to create your own aggregation class, make sure to inherit from\n``object_events.models.UserAggregationBase``.\n\nNow, call the management command manually or e.g. with cronjobs. Manually::\n\n ./manage.py send_event_emails realtime\n\nWith cronjobs for example:\n\n.. code-block:: bash\n\n * * * * * $HOME/webapps/$DJANGO_APP_NAME/myproject/manage.py send_event_emails realtime > $HOME/mylogs/cron/send_event_emails.log 2>&1\n\nHuh, cronjobs? If you are a bit server savvy connect to your server and type in\n``EDITOR=nano crontab -e``.\n\nWhatever, maybe you want to try it manually first.\nNow you're free to work with this app, like, appending it to your project and\nconnect your models to it via post_save signals. Whatever you will do, have fun\nwith it!\n\nTranslation of emails\n+++++++++++++++++++++\n\nIf you want your emails to be translated in the user's preferred language, just\nadd a language field to the profile model. For example:\n\n.. code-block:: python\n\n language = models.CharField(\n max_length=10,\n choices=settings.LANGUAGES,\n verbose_name=_('Language'),\n default=settings.LANGUAGES[0][0],\n )\n\nUse with AJAX functions\n+++++++++++++++++++++++\n\nThe basic functions like single_mark and bulk_mark can be easily used with\nAJAX. Just add the following files to your base.html.\n\n \n \n\nThe css and the js file are already imported in the objectevent_list.html\ntemplate.\n\nSettings\n--------\n\nOBJECT_EVENTS_USER_AGGREGATION_CLASS\n++++++++++++++++++++++++++++++++++++\n\nDefault: 'object_events.models.UserAggregation'\n\nThis is a class, which lets you create custom function to aggregate all users,\nwhich should be notified. Therefore you can e.g. build a user profile, which\ncontains an interval or rrule setting.\n\nFeel free to create custom functions and overrides. Just make sure to use the\nbase class ``object_events.models.UserAggregationBase``.\n\nThe following functions can be defined::\n\n get_realtime_users()\n get_daily_users()\n get_weekly_users()\n get_monthly_users()\n\nAlways return a list of primary keys of Django's User model.\n\n\nAUTH_PROFILE_MODULE\n++++++++++++++++++++++++++++++\n\nDefault: 'test_app.TestProfile'\n\nYou might know this setting already. This Django setting connects a custom\nmodel to Django's User model. As you can see in the setting\nOBJECT_EVENTS_USER_AGGREGATION_CLASS above you will have to provide User\nquerysets, based on interval preferences. So create a custom model, which looks\nlike the one in our test app to use our basic aggregation class.\n\nIf you want to provide different or custom email addresses to the email\nnotification command you can define a getter function called\n``get_preferred_email``, e.g.:\n\n def get_preferred_email(self):\n if self.email:\n return self.email\n return self.user.email\n\n\nOBJECT_EVENTS_PAGINATION_ITEMS\n++++++++++++++++++++++++++++++\n\nDefault: 30\n\nAmount of notifications to display in the notification list view.\n\n\nRoadmap\n-------\n\nSee the issue tracker for current and upcoming features.",
"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/bitmazk/django-object-events",
"keywords": "django,reusable,events,notifications,generic",
"license": "The MIT License",
"maintainer": null,
"maintainer_email": null,
"name": "django-object-events",
"package_url": "https://pypi.org/project/django-object-events/",
"platform": "OS Independent",
"project_url": "https://pypi.org/project/django-object-events/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/bitmazk/django-object-events"
},
"release_url": "https://pypi.org/project/django-object-events/1.2/",
"requires_dist": null,
"requires_python": null,
"summary": "Generic app for creating events that can be shown to the user in a notifications list.",
"version": "1.2"
},
"last_serial": 1293800,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "d0a1954cb10954e88caa3e49469abc9e",
"sha256": "521ddd6d57d71658fe8f42c3d3140937df1dc6e52e2b99c8da1958f76430ac84"
},
"downloads": -1,
"filename": "django-object-events-0.1.tar.gz",
"has_sig": false,
"md5_digest": "d0a1954cb10954e88caa3e49469abc9e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8889,
"upload_time": "2013-03-01T14:22:54",
"url": "https://files.pythonhosted.org/packages/48/80/02ff67bdd18c490cee7cfa6c4be65ac9af7a4fb564046720a8681f101929/django-object-events-0.1.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "e5e6a8bac2c3d6dd60d7feb19c44d856",
"sha256": "19876a0550a70d2fd8a40694d748113c5ff0658efc342dde1d87f0878b804efa"
},
"downloads": -1,
"filename": "django-object-events-0.2.tar.gz",
"has_sig": false,
"md5_digest": "e5e6a8bac2c3d6dd60d7feb19c44d856",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19195,
"upload_time": "2013-04-08T09:35:24",
"url": "https://files.pythonhosted.org/packages/be/fd/351f61a665e6eed5aa43fadb65b30cb1b580d2d3cb19a6a8052ac5969f10/django-object-events-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "32242e5ecc75ae1e46168b59eaf0a6e0",
"sha256": "78303ff1f9787227887f70a05ed449d5d472387d06b27b8d08e8d160fd55cbae"
},
"downloads": -1,
"filename": "django-object-events-0.3.tar.gz",
"has_sig": false,
"md5_digest": "32242e5ecc75ae1e46168b59eaf0a6e0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20151,
"upload_time": "2013-04-25T07:28:48",
"url": "https://files.pythonhosted.org/packages/f9/58/6f70ddbee720b274e0c4c6be5dcf94b49fd6ae084977d8153d44aa4b7472/django-object-events-0.3.tar.gz"
}
],
"0.3.1": [
{
"comment_text": "",
"digests": {
"md5": "2fb9290483ef5e5c9afdfa6b8c19b482",
"sha256": "49c2b6a9d677a94c207279359e406254e6ae5a23afd4136c5ffbc0c754ec1ae7"
},
"downloads": -1,
"filename": "django-object-events-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "2fb9290483ef5e5c9afdfa6b8c19b482",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21513,
"upload_time": "2013-07-15T12:07:13",
"url": "https://files.pythonhosted.org/packages/3b/17/66d26b7ee06be6ba49ca89f2f9ec343f41539691bc14ab7607be4c1291c9/django-object-events-0.3.1.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "9fa260e7bb7ae5401db98547c5bde987",
"sha256": "9aaca8f8aed6155c779a5dc7de1e8ee54cb38fd1462d2139cf94b147bc0c566e"
},
"downloads": -1,
"filename": "django-object-events-0.4.tar.gz",
"has_sig": false,
"md5_digest": "9fa260e7bb7ae5401db98547c5bde987",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21554,
"upload_time": "2013-07-24T07:20:51",
"url": "https://files.pythonhosted.org/packages/86/a2/c1595c10795d3569c9969888034374b556795d040d5009359367a80245ff/django-object-events-0.4.tar.gz"
}
],
"0.5": [
{
"comment_text": "",
"digests": {
"md5": "b6cc72e35ddc6c097978924266d3e44d",
"sha256": "d443193b0b075420cfc648cbc8d08e66caa91e4e0597cca5965f62f5136d005e"
},
"downloads": -1,
"filename": "django-object-events-0.5.tar.gz",
"has_sig": false,
"md5_digest": "b6cc72e35ddc6c097978924266d3e44d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20008,
"upload_time": "2013-12-14T08:33:43",
"url": "https://files.pythonhosted.org/packages/98/1e/9143bd3e8cb7c7a48285c9b68704f842bb391ac4feb1a08d41bb89e1576d/django-object-events-0.5.tar.gz"
}
],
"0.5.1": [
{
"comment_text": "",
"digests": {
"md5": "cf124673aec0025378bce9bcc9f6e1e1",
"sha256": "53e58e104aef017258051291f6dcd1ad7126b4b3f2c11ea40d018f3dcf279099"
},
"downloads": -1,
"filename": "django-object-events-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "cf124673aec0025378bce9bcc9f6e1e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20063,
"upload_time": "2013-12-14T08:48:21",
"url": "https://files.pythonhosted.org/packages/c4/b7/aae90664cbd5462273d8293487f69535fd2a41359bdda02ff7bdbbd36b09/django-object-events-0.5.1.tar.gz"
}
],
"0.6": [
{
"comment_text": "",
"digests": {
"md5": "f25774349723099b8ff7b15b2960e3b2",
"sha256": "56eca0fd61df8ff02b42baf2d7df0b463aa50853bc8a1973a568855e34b4f456"
},
"downloads": -1,
"filename": "django-object-events-0.6.tar.gz",
"has_sig": false,
"md5_digest": "f25774349723099b8ff7b15b2960e3b2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22541,
"upload_time": "2014-02-08T16:03:36",
"url": "https://files.pythonhosted.org/packages/bb/7f/51613aac3ae78a2dcfafedef140d59df524f0f0d83ae6e83efbe78b7b77c/django-object-events-0.6.tar.gz"
}
],
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "6b15344e0153c8897b1598dcf10289aa",
"sha256": "07e8bf1aff9ba46256847eee27c85379781c73f4c5fddceae4aea7cddff0a094"
},
"downloads": -1,
"filename": "django-object-events-1.0.tar.gz",
"has_sig": false,
"md5_digest": "6b15344e0153c8897b1598dcf10289aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20618,
"upload_time": "2014-05-15T05:59:42",
"url": "https://files.pythonhosted.org/packages/e8/66/86fc253452ab3d9d54f724371da3c229cd43187585489da8ed47f8dc35ce/django-object-events-1.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "21d85a2f214aeeb33fcd02b05d0a4fa9",
"sha256": "8db6e23ecc1aa53f023fd6a350fa08f7cbf3e9b0039c40c78b0aafe76b36c575"
},
"downloads": -1,
"filename": "django-object-events-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "21d85a2f214aeeb33fcd02b05d0a4fa9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20625,
"upload_time": "2014-05-15T07:17:56",
"url": "https://files.pythonhosted.org/packages/a2/b3/09fe57dfabf2a2b2d446ea2daebc1369ae362a552f26823f58ea63ceeabf/django-object-events-1.0.1.tar.gz"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "2ffd4abc59e671da6f89efa7704203f4",
"sha256": "4588a638f7382db1633df602a475b0958dffc5dccd55f90dbf7b865b23909fc1"
},
"downloads": -1,
"filename": "django-object-events-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "2ffd4abc59e671da6f89efa7704203f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20703,
"upload_time": "2014-05-15T09:50:40",
"url": "https://files.pythonhosted.org/packages/f4/47/a339fa929c101661b83f5c20657ee5621e533c4780de762a3d45e404ab8d/django-object-events-1.0.2.tar.gz"
}
],
"1.0.3": [
{
"comment_text": "",
"digests": {
"md5": "c211dd85ef667282a55621b755a8f80d",
"sha256": "d0a7afd50752a11b1fcc4106e74bb3bbdc8aae56d9825ad142c083ee9df96518"
},
"downloads": -1,
"filename": "django-object-events-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "c211dd85ef667282a55621b755a8f80d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20717,
"upload_time": "2014-05-15T10:40:57",
"url": "https://files.pythonhosted.org/packages/59/6c/bedac488926f072ec3eb09b75639fb2bbfb3fedfb1e431193ea2eb604540/django-object-events-1.0.3.tar.gz"
}
],
"1.0.4": [
{
"comment_text": "",
"digests": {
"md5": "3b39425708cdbfe328660d4427160ec0",
"sha256": "ee045d4ef15d40f6a2d636b03c237a4faa6488cbf650460d03ac67335be3c6d1"
},
"downloads": -1,
"filename": "django-object-events-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "3b39425708cdbfe328660d4427160ec0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23222,
"upload_time": "2014-05-16T06:06:39",
"url": "https://files.pythonhosted.org/packages/e5/73/183bc67b2b5cdce589f6db08356c64c43c2f11cee30a67067dc844dfc2d2/django-object-events-1.0.4.tar.gz"
}
],
"1.0.5": [
{
"comment_text": "",
"digests": {
"md5": "5469cc5205249c1c01a33383d978a856",
"sha256": "d316476648bcf35814ec462ffc4df606bbdc9cbdada49d5593488b5c9dfd79df"
},
"downloads": -1,
"filename": "django-object-events-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "5469cc5205249c1c01a33383d978a856",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20785,
"upload_time": "2014-10-02T15:41:30",
"url": "https://files.pythonhosted.org/packages/fc/ac/18f6c7181e62775f7f13cebe8ca079d9415442bfedfd69b52e32501d02cb/django-object-events-1.0.5.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "396edd10c6d96d350de2f1c3e77d04bd",
"sha256": "c07121c0ad8fb387eb2dd2931a02567424db9bfe8915a2ea7f6a60d35b7a5d0a"
},
"downloads": -1,
"filename": "django-object-events-1.1.tar.gz",
"has_sig": false,
"md5_digest": "396edd10c6d96d350de2f1c3e77d04bd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21061,
"upload_time": "2014-10-07T08:28:15",
"url": "https://files.pythonhosted.org/packages/82/d8/15e067fa230bc2f0300dfae32c27ef8379e94ab1b9bc15f7f68d3725648c/django-object-events-1.1.tar.gz"
}
],
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "bfb49f4aa0823ae97da30ba5391b1304",
"sha256": "1b303882f75f27d3d4cef52d5c88f89f84d5b2770047ba6417ddd85f1b966356"
},
"downloads": -1,
"filename": "django-object-events-1.2.tar.gz",
"has_sig": false,
"md5_digest": "bfb49f4aa0823ae97da30ba5391b1304",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20928,
"upload_time": "2014-11-04T10:15:26",
"url": "https://files.pythonhosted.org/packages/2e/9d/453e75bec66a32df23747c0f65b85ae98959968311d18df26cf6adf87e7f/django-object-events-1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "bfb49f4aa0823ae97da30ba5391b1304",
"sha256": "1b303882f75f27d3d4cef52d5c88f89f84d5b2770047ba6417ddd85f1b966356"
},
"downloads": -1,
"filename": "django-object-events-1.2.tar.gz",
"has_sig": false,
"md5_digest": "bfb49f4aa0823ae97da30ba5391b1304",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20928,
"upload_time": "2014-11-04T10:15:26",
"url": "https://files.pythonhosted.org/packages/2e/9d/453e75bec66a32df23747c0f65b85ae98959968311d18df26cf6adf87e7f/django-object-events-1.2.tar.gz"
}
]
}