#35668: Expand format_html_join() to allow keyword formatting
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Mohamed
| Nabil Rady
Type: New feature | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mohamed Nabil Rady):
How should the function behave if we want to use only args, only kwargs,
or both ?
{{{
from django.utils.html import format_html_join
html = format_html_join(
"\n",
'<li data-id="{id}">{title} ({id})</li>',
[
{"id": book.id, "title": book.title}
for book in books
]
)
}}}
How will this example work ? The third argument should the args generator.
--
Ticket URL: <https://code.djangoproject.com/ticket/35668#comment:3>
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/010701913ececdb9-85b47074-d789-4df8-a5e6-ecf78984788b-000000%40eu-central-1.amazonses.com.