diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index de924a3..724b74d 100644
|
a
|
b
|
http://diveintomark.org/archives/2004/02/04/incompatible-rss
|
| 21 | 21 | |
| 22 | 22 | import re |
| 23 | 23 | import datetime |
| | 24 | from urlparse import urlparse |
| 24 | 25 | from django.utils.xmlutils import SimplerXMLGenerator |
| 25 | 26 | from django.utils.encoding import force_unicode, iri_to_uri |
| 26 | 27 | |
| … |
… |
def rfc3339_date(date):
|
| 47 | 48 | |
| 48 | 49 | def get_tag_uri(url, date): |
| 49 | 50 | "Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id" |
| 50 | | tag = re.sub('^http://', '', url) |
| 51 | | if date is not None: |
| 52 | | tag = re.sub('/', ',%s:/' % date.strftime('%Y-%m-%d'), tag, 1) |
| 53 | | tag = re.sub('#', '/', tag) |
| 54 | | return u'tag:' + tag |
| | 51 | url_split = urlparse(url) |
| | 52 | tagging_entity = "%s,%s:" % (url_split.hostname, date.strftime('%Y-%m-%d')) |
| | 53 | return u'tag:%s%s/%s' % (tagging_entity, url_split.path, url_split.fragment) |
| 55 | 54 | |
| 56 | 55 | class SyndicationFeed(object): |
| 57 | 56 | "Base class for all syndication feeds. Subclasses should provide write()" |
diff --git a/tests/regressiontests/utils/tests.py b/tests/regressiontests/utils/tests.py
index 485c5fa..b38888c 100644
|
a
|
b
|
from django.utils import html, checksums
|
| 9 | 9 | import timesince |
| 10 | 10 | import datastructures |
| 11 | 11 | import itercompat |
| | 12 | import feedgenerator |
| 12 | 13 | from decorators import DecoratorFromMiddlewareTests |
| 13 | 14 | |
| 14 | 15 | # We need this because "datastructures" uses sorted() and the tests are run in |
| … |
… |
__test__ = {
|
| 23 | 24 | 'timesince': timesince, |
| 24 | 25 | 'datastructures': datastructures, |
| 25 | 26 | 'itercompat': itercompat, |
| | 27 | 'feedgenerator': feedgenerator, |
| 26 | 28 | } |
| 27 | 29 | |
| 28 | 30 | class TestUtilsHtml(TestCase): |