Syndication feed framework should allow for parsing of URLs in the URLconf
|Reported by:||adrian||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, the syndication feed framework requires the developer to parse URLs manually in Feed.get_object(), which violates the DRY principle and is confusing because it leads to URL parsing being in more than one place (i.e., in a place other than the URLconf). I am proposing a new view in django.contrib.syndication.views, called single_feed(), which allows for parsing the URL in the URLconf instead of Feed.get_object().
The problem with this patch, which I realized only after implementing it, is that it couples Feed to either single_feed() or multiple_feeds(). We could change Feed.get_object() to *always* take a list of URL parameters, but that would be a backwards-incompatibility. I'm posting my patch here for discussion.
Change History (4)
Changed 6 years ago by adrian
comment:1 Changed 6 years ago by floguy
- Cc floguy@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset