#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
     Reporter:  Piaume               |                    Owner:
                                     |  jasonkotenko
         Type:  New feature          |                   Status:  assigned
    Component:  contrib.syndication  |                  Version:  1.1
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by unaizalakain):

 Replying to [comment:7 aaugustin]:
 > It should be possible to accept either a string or a list of string, and
 to validate that there's only one enclosure for RSS feeds.

 Currently `Feed` builds the `Enclosure` from `item_enclosure_url`,
 `item_enclosure_length` and `item_enclosure_mime_type`. Accepting an
 optional list for one of them would mean accepting optional lists for the
 three of them and that would become quite a strange and cumbersome API.

 Instead, I propose creating a `item_enclosures` attr/func (following the
 way all the rest are gotten) which, by default, returns a list with a
 single `Enclosure` in it. That enclosure would be built using the url,
 length and mime_type gotten from the corresponding attrs.

 RSS feeds could then validate that `item_enclosures` is no longer than 1.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.9e314c606ab7d642bc6ff22be8c9e936%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to