summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-09 07:46:50 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-09 07:46:50 +0000
commite10f546b2190661d240f9daa6aca69f721696079 (patch)
tree675969e6e2019a1d55063fe04d3427d9b66b5c49
parentc772e39d3467b31843270b8703958043dce0562f (diff)
downloaddjango-e10f546b2190661d240f9daa6aca69f721696079.tar.gz
[1.1.X] Fixed #6039 -- Modified Atom example to be standard compliant. Thanks to ion.morega@gmail.com for the report, and arien for the patch.
Backport of r13179 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/ref/contrib/syndication.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
index 42a23019e6..19617236d8 100644
--- a/docs/ref/contrib/syndication.txt
+++ b/docs/ref/contrib/syndication.txt
@@ -906,13 +906,17 @@ They share this interface:
For example, to create an Atom 1.0 feed and print it to standard output::
>>> from django.utils import feedgenerator
+ >>> from datetime import datetime
>>> f = feedgenerator.Atom1Feed(
... title=u"My Weblog",
... link=u"http://www.example.com/",
... description=u"In which I write about what I ate today.",
- ... language=u"en")
+ ... language=u"en",
+ ... author_name=u"Myself",
+ ... feed_url=u"http://example.com/atom.xml")
>>> f.add_item(title=u"Hot dog today",
... link=u"http://www.example.com/entries/1/",
+ ... pubdate=datetime.now(),
... description=u"<p>Today I had a Vienna Beef hot dog. It was pink, plump and perfect.</p>")
>>> print f.writeString('UTF-8')
<?xml version="1.0" encoding="UTF-8"?>