summaryrefslogtreecommitdiffstats
path: root/coffin/contrib/syndication/feeds.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-10-10 23:20:27 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-10-10 23:20:27 -0400
commitd23043cfd1221546e63ac98723ae0329edecd42d (patch)
tree5791919f1004a7c166ad8ed18969692664b20ce7 /coffin/contrib/syndication/feeds.py
parent077cbd288ad7fde99fe42693dddd473b7ea4b404 (diff)
downloadaskbot-d23043cfd1221546e63ac98723ae0329edecd42d.tar.gz
askbot-d23043cfd1221546e63ac98723ae0329edecd42d.tar.bz2
askbot-d23043cfd1221546e63ac98723ae0329edecd42d.zip
removed coffin, from trunk, added dependencies and updated the version
Diffstat (limited to 'coffin/contrib/syndication/feeds.py')
-rw-r--r--coffin/contrib/syndication/feeds.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/coffin/contrib/syndication/feeds.py b/coffin/contrib/syndication/feeds.py
deleted file mode 100644
index f8f0701f..00000000
--- a/coffin/contrib/syndication/feeds.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from django.contrib.syndication.feeds import * # merge modules
-
-import sys
-from django.contrib.syndication.feeds import Feed as DjangoFeed
-from coffin.template import loader as coffin_loader
-
-
-class Feed(DjangoFeed):
- """A ``Feed`` implementation that renders it's title and
- description templates using Jinja2.
-
- Unfortunately, Django's base ``Feed`` class is not very extensible
- in this respect at all. For a real solution, we'd have to essentially
- have to duplicate the whole class. So for now, we use this terrible
- non-thread safe hack.
-
- Another, somewhat crazy option would be:
- * Render the templates ourselves through Jinja2 (possible
- introduce new attributes to avoid having to rewrite the
- existing ones).
- * Make the rendered result available to Django/the superclass by
- using a custom template loader using a prefix, say
- "feed:<myproject.app.views.MyFeed>". The loader would simply
- return the Jinja-rendered template (escaped), the Django template
- mechanism would find no nodes and just pass the output through.
- Possible even worse than this though.
- """
-
- def get_feed(self, *args, **kwargs):
- parent_module = sys.modules[DjangoFeed.__module__]
- old_loader = parent_module.loader
- parent_module.loader = coffin_loader
- try:
- return super(Feed, self).get_feed(*args, **kwargs)
- finally:
- parent_module.loader = old_loader \ No newline at end of file