#35261: Media Path as Objects - Documentation fix and usage example
-------------------------------------+-------------------------------------
Reporter: Leandro de Souza | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 4.1
Severity: Normal | Resolution:
Keywords: Documentation, | Triage Stage:
Media | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Leandro de Souza:
Old description:
> [Related conversation on forum](https://forum.djangoproject.com/t/media-
> path-as-objects/28470)
>
> Issue: The documentation for [Media Path as
> Objects](https://docs.djangoproject.com/en/4.1/topics/forms/media/#paths-
> as-objects) uses an incorrect attribute (`rel`) on a `script` tag,
> source: [HTML attribute: rel - HTML: HyperText Markup Language |
> MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).
> Quoted from the source:
>
> `The rel attribute defines the relationship between a linked resource and
> the current document. Valid on <link>, <a>, <area>, and <form>, the
> supported values depend on the element on which the attribute is found.`
>
> Another thing is that the example given for the usage of this new feature
> added on 4.1 is not really that useful. The `JSPath` class in the example
> is just a hardcoded script tag that illustrates how to use the `__str__`
> method to render the tag.
>
> I believe that adding a more useful example would add more "bright" to
> the value that this feature has providen: adding flexibility. Some usage
> examples of this new feature has been added to the conversation on the
> forum.
>
> I would be happy to work on this patch/fix.
New description:
Related conversation on forum: [https://forum.djangoproject.com/t/media-
path-as-objects/28470]
Issue: The documentation for Media Path as Objects
[https://docs.djangoproject.com/en/4.1/topics/forms/media/#paths-as-
objects] uses an incorrect attribute (`rel`) on a `script` tag, source:
HTML attribute: rel - HTML: HyperText Markup Language | MDN
[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. Quoted
from the source:
`The rel attribute defines the relationship between a linked resource and
the current document. Valid on <link>, <a>, <area>, and <form>, the
supported values depend on the element on which the attribute is found.`
Another thing is that the example given for the usage of this new feature
added on 4.1 is not really that useful. The `JSPath` class in the example
is just a hardcoded script tag that illustrates how to use the `__str__`
method to render the tag.
I believe that adding a more useful example would add more "bright" to the
value that this feature has providen: adding flexibility. Some usage
examples of this new feature has been added to the conversation on the
forum.
I would be happy to work on this patch/fix.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/35261#comment:1>
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/0107018df43f4286-14e348b1-c2fe-4e35-9801-d64dbf55ea05-000000%40eu-central-1.amazonses.com.