#35420: Add support for RSS stylesheets
-------------------------------------+-------------------------------------
Reporter: Baptiste | Owner: nobody
Mispelon |
Type: New | Status: new
feature |
Component: | Version: 5.0
contrib.syndication |
Severity: Normal | Keywords: rss, stylesheet
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Inspired by a blog post I read recently [1] I wanted to see how feasible
it would be to add an RSS stylesheet to the feeds that Django's
syndication framework generates.
In XML, that means adding a "processing instruction" (`<?xml-stylesheet
href="/rss.xsl" type="text/xsl"?>`) right after the start of the document
(`<?xml version="1.0" encoding="utf-8"?>`) but before the root node. It
turns out the syndication framework doesn't have the right hooks to make
this easy.
I would like to suggest adding support for a new optional argument that
would let users specify a path to a stylesheet URL. Or if that's
considered too specific/niche of a feature, then at least add a hook to
let users add the behavior without rewriting methods (for example by
moving `handler.startDocument()` out of `RssFeed.write()` and into a new
method).
[1] https://hyteck.de/post/django-rss/
--
Ticket URL: <https://code.djangoproject.com/ticket/35420>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018f336bcca6-89bc8610-e1ec-4512-a4fb-50266bcf7e22-000000%40eu-central-1.amazonses.com.