{
"info": {
"author": "Ali Zaidi",
"author_email": "alixedi@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 2 - Pre-Alpha",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3"
],
"description": "=============================\ndjango_filtered_feed\n=============================\n\n.. image:: https://badge.fury.io/py/django_filtered_feed.png\n :target: http://badge.fury.io/py/django_filtered_feed\n \n.. image:: https://travis-ci.org/alixedi/django_filtered_feed.png?branch=master\n :target: https://travis-ci.org/alixedi/django_filtered_feed\n\n.. image:: https://pypip.in/d/django_filtered_feed/badge.png\n :target: https://crate.io/packages/django_filtered_feed?version=latest\n\n.. image:: https://coveralls.io/repos/alixedi/django_filtered_feed/badge.png\n :target: https://coveralls.io/r/alixedi/django_filtered_feed\n\n\nSo the average-joe RSS is binary ie either you subscribe to a feed or you don't. This approach results in a ridiculous amount of junk in our inbox. What if we could subscribe ``define`` the feed that we would like to subscribe to? Thanks to the stellar `django syndication framework `_ and `django filters `_, I was able to hack together a fix.\n\n\nIf you have a ``Book`` model like so: ::\n\n class Book(models.Model):\n name = models.CharField(max_length=256)\n pages = models.IntegerField()\n\n def __unicode__(self):\n return self.name\n\nA `django_filter `_ ``FilterSet`` like so: ::\n\n class BookFilterSet(django_filters.FilterSet):\n pages = django_filters.NumberFilter(lookup_type='lt')\n class Meta:\n model = Book\n fields = ['pages']\n\nA ``FilteredFeed`` class like so: ::\n\n class BookFilteredFeed(BaseFilteredFeed):\n model = Book\n filter_set = BookFilterSet\n title = \"BookFeed\"\n link = \"http://localhost:8000\"\n description = \"Get alerts for new books - less than given number of pages!\"\n\n def item_link(self, item):\n return reverse('book_detail', args=[item.id])\n\nHook up the necessary urls like so: ::\n\n urlpatterns = patterns('',\n url(r'^books/feed$', BookFilteredFeed.as_view(), name='book_feed'),\n )\n\nAnd finally, if we have the following 3 books in our DB:\n\n1. Introduction to Python (100 pages)\n2. Introduction to C (300 pages)\n3. Javascript - The good parts (300 pages)\n\nHitting `http://localhost:8000/books/feed `_ will give you an RSS feed includes:\n\n* Introduction to Python\n* Introduction to C\n* Javascript - The good parts\n\nAnd hitting `http://localhost:8000/books/feed?pages=200 `_ will give you an RSS feed that just includes:\n\n* Introduction to Python\n\nYou users will forever remain grateful for sparing them the deluge that follows a binary subscription. You will be hailed the king of syndication, worshipped as a rock star and live happily ever after. The best part is that it takes a minute to get started: ::\n\n pip install django_filtered_feed\n\nFollowed ofcourse by including `filtered_feed` in your `INSTALLED_APPS`. ::\n\n INSTALLED_APPS = (\n ...\n 'filtered_feed',\n ...\n )\n\n\n\nHistory\n-------\n\n0.1.0 (2014-08-18)\n++++++++++++++++++\n\n* First release on PyPI.",
"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/alixedi/django_filtered_feed",
"keywords": "django_filtered_feed",
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "django_filtered_feed",
"package_url": "https://pypi.org/project/django_filtered_feed/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django_filtered_feed/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/alixedi/django_filtered_feed"
},
"release_url": "https://pypi.org/project/django_filtered_feed/0.1.0/",
"requires_dist": null,
"requires_python": null,
"summary": "Feeds sans noise.",
"version": "0.1.0"
},
"last_serial": 1195643,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "1fe1a8c3abbc8b620f46ffd21c1735f5",
"sha256": "64fdd25cf4653ff0e29f48fe13c6651d7b66cb82c9ef5b9da3b3a50e9f587221"
},
"downloads": -1,
"filename": "django_filtered_feed-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1fe1a8c3abbc8b620f46ffd21c1735f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14166,
"upload_time": "2014-08-19T18:09:17",
"url": "https://files.pythonhosted.org/packages/45/53/2fab4aab6797cccfd8e1bbc737248bd6535aef3d936dff617d6e63a49195/django_filtered_feed-0.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1fe1a8c3abbc8b620f46ffd21c1735f5",
"sha256": "64fdd25cf4653ff0e29f48fe13c6651d7b66cb82c9ef5b9da3b3a50e9f587221"
},
"downloads": -1,
"filename": "django_filtered_feed-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1fe1a8c3abbc8b620f46ffd21c1735f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14166,
"upload_time": "2014-08-19T18:09:17",
"url": "https://files.pythonhosted.org/packages/45/53/2fab4aab6797cccfd8e1bbc737248bd6535aef3d936dff617d6e63a49195/django_filtered_feed-0.1.0.tar.gz"
}
]
}