1
0
mirror of https://github.com/django/django.git synced 2025-07-21 01:59:26 +00:00

[1.0.X] Fixed #9291 -- Tweaked a piece of example code slightly to set a good

example for others (now uses an encoding that is guaranteed to work for XML
consumers).

Backport r9133 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-10-05 06:22:58 +00:00
parent f9e78ed612
commit e15bdf767e

View File

@ -921,8 +921,8 @@ For example, to create an Atom 1.0 feed and print it to standard output::
>>> f.add_item(title=u"Hot dog today", >>> f.add_item(title=u"Hot dog today",
... link=u"http://www.example.com/entries/1/", ... link=u"http://www.example.com/entries/1/",
... description=u"<p>Today I had a Vienna Beef hot dog. It was pink, plump and perfect.</p>") ... description=u"<p>Today I had a Vienna Beef hot dog. It was pink, plump and perfect.</p>")
>>> print f.writeString('utf8') >>> print f.writeString('UTF-8')
<?xml version="1.0" encoding="utf8"?> <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
... ...
</feed> </feed>