Added a new ''modified:' metadata tag to be able to specify the

publication time and date and the last modified time and date
independently.

This makes it possible to access the last updated date with {{ article.locale_modified }} in templates.
Additionally, an already delivered feed entry can be corrected by changing the modified date and time, as it is used for atom:update
/ rss pubDate field now.
This commit is contained in:
Florian Jacob 2013-11-05 19:38:58 +01:00
commit 4b2fcb09a4
73 changed files with 381 additions and 152 deletions

View file

@ -42,6 +42,7 @@ class RstReaderTest(ReaderTest):
' supported\nas well as <strong>inline'
' markup</strong>.</p>\n',
'date': datetime.datetime(2010, 12, 2, 10, 14),
'modified': datetime.datetime(2010, 12, 2, 10, 20),
'tags': ['foo', 'bar', 'foobar'],
'custom_field': 'http://notmyidea.org',
}
@ -137,6 +138,7 @@ class MdReaderTest(ReaderTest):
'title': 'Test md File',
'summary': '<p>I have a lot to test</p>',
'date': datetime.datetime(2010, 12, 2, 10, 14),
'modified': datetime.datetime(2010, 12, 2, 10, 20),
'tags': ['foo', 'bar', 'foobar'],
}
for key, value in metadata.items():
@ -149,6 +151,7 @@ class MdReaderTest(ReaderTest):
'summary': '<p>パイソンとVirtualenvをまっくでインストールする方法について明確に説明します。</p>',
'category': '指導書',
'date': datetime.datetime(2012, 12, 20),
'modified': datetime.datetime(2012, 12, 22),
'tags': ['パイソン', 'マック'],
'slug': 'python-virtualenv-on-mac-osx-mountain-lion-10.8',
}
@ -184,6 +187,7 @@ class MdReaderTest(ReaderTest):
'<p>Summary with <strong>inline</strong> markup '
'<em>should</em> be supported.</p>'),
'date': datetime.datetime(2012, 10, 31),
'modified': datetime.datetime(2012, 11, 1),
'slug': 'article-with-markdown-containing-footnotes',
}
self.assertEqual(content, expected_content)