[Django] #35420: Add support for RSS stylesheets

8 views
Skip to first unread message

Django

unread,
May 1, 2024, 5:10:58 AMMay 1
to django-...@googlegroups.com
#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.

Django

unread,
May 1, 2024, 5:19:18 AMMay 1
to django-...@googlegroups.com
#35420: Add support for RSS stylesheets
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: New feature | Status: new
Component: contrib.syndication | Version: 5.0
Severity: Normal | Resolution:
Keywords: rss, stylesheet | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):

PR here: https://github.com/django/django/pull/18120
--
Ticket URL: <https://code.djangoproject.com/ticket/35420#comment:1>

Django

unread,
May 2, 2024, 5:37:09 AMMay 2
to django-...@googlegroups.com
#35420: Add support for RSS stylesheets
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: New feature | Status: closed
Component: contrib.syndication | Version: 5.0
Severity: Normal | Resolution: duplicate
Keywords: rss, stylesheet | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* resolution: => duplicate
* status: new => closed

Comment:

Hi Baptiste, I am not very knowledgeable in RSS feeds, but this feels
related to #12978 and certainly the "motivation" behind it feels very
similar.
I'm going to mark this as a duplicate of #12978 but if you disagree,
please let me know 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/35420#comment:2>

Django

unread,
May 2, 2024, 7:39:27 AMMay 2
to django-...@googlegroups.com
#35420: Add support for RSS stylesheets
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: New feature | Status: closed
Component: contrib.syndication | Version: 5.0
Severity: Normal | Resolution: duplicate
Keywords: rss, stylesheet | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):

Hi,

Sorry my mistake. I had searched on trac for an existing ticket but not
well enough apparently (I think i just did a keyword search on "rss" in
the summary).

This ticket is an exact duplicate, and my PR is even really similar to the
14 year old patch that was already attached 😅
--
Ticket URL: <https://code.djangoproject.com/ticket/35420#comment:3>
Reply all
Reply to author
Forward
0 new messages