Today I realized a wart in our syndication (RSS/Atom) framework -- in the case of nontrivial feeds, the Feed.get_object() method has to implement its own URL parsing. That's a wart because, in my opinion, the URL parsing should be in the URLconf. In other words, why not just use the URLconf parsing, and pass the captured parameters to Feed.get_object() as a list, instead of passing a string of the entire URL?
I've implemented an experimental new view in django.contrib.syndication.views -- single_feed() -- which relies on the URLconf to parse the necessary bits out of the URL, rather than relying on Feed.get_object(). I didn't commit it to trunk, because it's not fully baked yet, but the patch is here: http://code.djangoproject.com/attachment/ticket/6304/single_feed.diff The problem is that it would either introduce a backwards incompatibility in Feed.get_object() or couple a Feed class to the type of view that can call it (either single_feed() or the legacy feed() view, which I renamed to multiple_feeds() in the patch). Or is there another way of doing this that would avoid both problems? This is so esoteric that it probably makes very little sense, so if anybody is interested in this, just read the patch, which includes documentation updates. Having dealt with this for the past hour or two, my brain is a bit burned out thinking about it! :-) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---