Commits

Anonymous committed 9a05025

[project @ 329]
Fixed bug with {% atomlink %} and {% atomlinkvisible %} that threw exception on pages without atom feeds.

  • Participants
  • Parent commits d1dd4f8

Comments (0)

Files changed (1)

File cciw/cciwmain/templatetags/standardpage.py

     def __init__(self, parser, token):
         pass
     def render(self, context):
-        title = context['atom_feed_title']
+        title = context.get('atom_feed_title', None)
         if title:
             return '<link rel="alternate" type="application/atom+xml" href="%(url)s?format=atom" title="%(title)s" />' \
             % {'url': context['request'].path, 'title': title }
     def __init__(self, parser, token):
         pass
     def render(self, context):
-        title = context['atom_feed_title']
+        title = context.get('atom_feed_title', None)
         if title:
             return ('<div class="atomlink">' + 
                     '<a href="/website/feeds/" title="What\'s this?">?</a> ' +