{ "info": { "author": "Unai Zalakain", "author_email": "contact@unaizalakain.info", "bugtrack_url": null, "classifiers": [], "description": "Overview\n--------\n\n``django-simple-events`` lets you bind your models to events. This events have the\nfollowing configuration options:\n\n- beginning\n- time\n- frecuency: single time, daily, weekly, montly, yearly\n- interval: times between frecuencies\n- repetitions\n- end\n\nThe event occurrences are stored in the DB when an event gets saved. If you don't \nspecify a maximum repetitions number or the end datetime, the event occurrences are \nupdated periodically with the ``update_occurrences`` command.\n\nInstalation\n-----------\n\nAdd ``events`` to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n ...\n 'events',\n ...\n )\n\nSet ``EVENTS_MAX_FUTURE_OCCURRENCES`` to indicate the maximum of future occurrences to\nrecolect in the DB if an event is endless ::\n\n EVENTS_MAX_FUTURE_OCCURRENCES = 50\n\nYou can also set ``EVENTS_MAX_PAST_OCCURRENCES``\n\nUsage\n-----\n\nIn the following examples we are going to relate ``Study`` objects to events.\n\nModels\n~~~~~~\n\nIf you want to access from ``Study`` the events, it's recommendable to add a \ngeneric relation ::\n\n from django.db import models\n from django.contrib.contenttypes import generic\n from events.models import Event\n\n class Study(models.Model):\n ...\n events = generic.GenericRelation(Event)\n ...\n\n\nAPI\n~~~\n\nGet the events related to a ``Study``::\n\n study = Study.objects.get(pk=1)\n study.events.all()\n\nAdd an event to a ``Study``::\n \n from events.models import Event\n from datetime import date, time\n\n study = Study.objects.get(pk=1)\n event = Event(date.today(), time.now())\n\n event.related_object = study\n event.save()\n\n study.events.get(pk=event.pk)\n\nPlay with the occurrences of an event::\n \n from events.models import Event\n\n event = Event.objects.get(pk=1)\n \n #get all the occurrences as an iter of datetimes\n event.get_occurrences()\n\n #get all of past occurrences as a list of datetimes\n event.get_past_occurrences()\n\n #get the last 20 past occurrences as a list of datetimes\n event.get_past_occurrences(20)\n\n #get the next 20 future occurrences as a list of datetimes\n event.get_future_occurrences(20)\n\n #update the Occurrence objects of an event\n event.update_occurrences(event.get_occurrences)\n\n #get the Occurrence objects of an event\n event.occurrence_set.all()\n\n #get all the Study objects that have occurrences in the future\n from datetime import datetime\n Study.objects.filter(events__occurrence__datetime__gt=datetime.now())\n\nAdmin\n~~~~~\n\nIf, when you are editing a ``Study`` in admin, you want to also edit the\nrelated events, you are easilly done::\n\n from django.contrib import admin\n\n from events.admin import EventInline\n\n class StudyAdmin(admin.ModelAdmin):\n ...\n inlines = EventInline,\n ...\n admin.site.register(Study, StudyAdmin)\n\nForms\n~~~~~\n\nYou can also use the event form::\n\n from events.forms import EventForm", "description_content_type": null, "docs_url": null, "download_url": "http://svn.unaizalakain.info/django-simple-events/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://unaizalakain.info/blog/django-simple-events/", "keywords": "events occurrences daily weekly montly yearly repetitions", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "django-simple-events", "package_url": "https://pypi.org/project/django-simple-events/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-simple-events/", "project_urls": { "Download": "http://svn.unaizalakain.info/django-simple-events/", "Homepage": "http://unaizalakain.info/blog/django-simple-events/" }, "release_url": "https://pypi.org/project/django-simple-events/1.2/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "1.2" }, "last_serial": 790626, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "271b366ceaa730220c11ca64228d67e8", "sha256": "a0970b9e92aae0a29d64002e0dceb2c08ec02b4da3942ade1d549111363c4765" }, "downloads": -1, "filename": "django-simple-events-0.1.tar.gz", "has_sig": false, "md5_digest": "271b366ceaa730220c11ca64228d67e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2662, "upload_time": "2011-08-02T05:18:19", "url": "https://files.pythonhosted.org/packages/06/b2/1619fc32c6f51010bb62ff383948b1a49878d5adf3f4cc782c73672e3e19/django-simple-events-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d37fb7202388856fa3a3e97dabb65c34", "sha256": "eaae5361b84a024ebdb18f495f10efacc9c75ccd2f5f02557aa8969f6239e1cb" }, "downloads": -1, "filename": "django-simple-events-0.2.tar.gz", "has_sig": false, "md5_digest": "d37fb7202388856fa3a3e97dabb65c34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2665, "upload_time": "2011-08-02T05:25:30", "url": "https://files.pythonhosted.org/packages/9b/3a/505a75c512a5934fb187109b8e03699e1af2f9f5d39bf127878d190bf628/django-simple-events-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "368272aa862f5825313ac6fed252623e", "sha256": "a5deca086b1dfe94f5ca06cc1d815795dbf3a714a42e500bbc53a4d4efa47d69" }, "downloads": -1, "filename": "django-simple-events-0.3.tar.gz", "has_sig": false, "md5_digest": "368272aa862f5825313ac6fed252623e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2642, "upload_time": "2011-08-02T05:29:08", "url": "https://files.pythonhosted.org/packages/7c/17/1be8a5b990e27c5987177b5606290f5ac3c9678c42b0d05229edf2b11044/django-simple-events-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "6e2a8d6931c3f87f8fe6e4aebeb779b3", "sha256": "0d02dbd02c406dfa0946ada5e086c8e7bb7093e7071bf382d32cfe65bde25107" }, "downloads": -1, "filename": "django-simple-events-0.4.tar.gz", "has_sig": false, "md5_digest": "6e2a8d6931c3f87f8fe6e4aebeb779b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2665, "upload_time": "2011-08-02T05:31:18", "url": "https://files.pythonhosted.org/packages/13/b7/6b78859563fe3dd5526d4ee9d29a82c3cfed33f8e0faba0882cf6a52f245/django-simple-events-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "6479a6457311bb80e6089b5e31cfcb91", "sha256": "732eb66b369451c60628e51151c1f99fa772771f730155d3ecdbdfcb7fba7d3d" }, "downloads": -1, "filename": "django-simple-events-0.5.tar.gz", "has_sig": false, "md5_digest": "6479a6457311bb80e6089b5e31cfcb91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15628, "upload_time": "2011-08-02T14:50:01", "url": "https://files.pythonhosted.org/packages/30/4e/e4fac2573eca77288b3eba789573764d62cd7bb4ffdc6605016e2ea8c8d5/django-simple-events-0.5.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "246a4b280390dd47dd2a1d3ed40b66e8", "sha256": "0f9c57a390ace22cc78cd031105aaffee922684832780bbff3fb856c714e5ba1" }, "downloads": -1, "filename": "django-simple-events-1.0.tar.gz", "has_sig": false, "md5_digest": "246a4b280390dd47dd2a1d3ed40b66e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33473, "upload_time": "2011-08-02T18:31:28", "url": "https://files.pythonhosted.org/packages/cf/cb/0c3729b41e9d4248832c0b7035be394edc2f0dedfeb25dd7b0a446201b1b/django-simple-events-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "b1d2407aaf7f2870c8b3d9578f1aa071", "sha256": "037d920b596247c2537d7be2367444cfd5517c249a7fa8494775a66a596edab2" }, "downloads": -1, "filename": "django-simple-events-1.1.tar.gz", "has_sig": false, "md5_digest": "b1d2407aaf7f2870c8b3d9578f1aa071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 202492, "upload_time": "2011-08-02T18:52:37", "url": "https://files.pythonhosted.org/packages/1e/6b/3cd96459291cbad90516173793bc72fdef973735a68a10a20f6f3523bd2d/django-simple-events-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "08b81dd93af19333b058a8d7f35a11ab", "sha256": "468f41de020e5547195bd752c2dc8afe6bf9639da92cf12b16462d66718c3ec6" }, "downloads": -1, "filename": "django-simple-events-1.2.tar.gz", "has_sig": false, "md5_digest": "08b81dd93af19333b058a8d7f35a11ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 202512, "upload_time": "2011-08-09T01:05:11", "url": "https://files.pythonhosted.org/packages/b6/fb/e2a410150b5183629d07449f76529adfebbe38b7053445941a8d62c73bbd/django-simple-events-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08b81dd93af19333b058a8d7f35a11ab", "sha256": "468f41de020e5547195bd752c2dc8afe6bf9639da92cf12b16462d66718c3ec6" }, "downloads": -1, "filename": "django-simple-events-1.2.tar.gz", "has_sig": false, "md5_digest": "08b81dd93af19333b058a8d7f35a11ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 202512, "upload_time": "2011-08-09T01:05:11", "url": "https://files.pythonhosted.org/packages/b6/fb/e2a410150b5183629d07449f76529adfebbe38b7053445941a8d62c73bbd/django-simple-events-1.2.tar.gz" } ] }