hi I am currently using this javascript and would love to do it natively in python... can someone lend me a hand getting the same result as I do with the JS but server side? instead of outputting the string list I want to output the html and string numbers.
<script type="text/javascript"> const out = {{ blk.ats|blkatid|safe }}.reduce((prev, item) => prev +=
This takes a python string like this: ['12227509686562344891', '14231167159403602480'] and gives me an html output in django like this:
<a href="/at/12227509686562344891">12227509686562344891</a><br/><a href="/at/14231167159403602480">14231167159403602480</a><br/>
So the above string is what i need the python script to output.. the original string list can be one or many.
for an html output similar to this:
12227509686562344891
14231167159403602480
<script type="text/javascript"> const out = {{ blk.ats|blkatid|safe }}.reduce((prev, item) => prev +=
<a href=/at/${item}>${item}</a><br/>
, ''); document.write(out);</script>This takes a python string like this: ['12227509686562344891', '14231167159403602480'] and gives me an html output in django like this:
<a href="/at/12227509686562344891">12227509686562344891</a><br/><a href="/at/14231167159403602480">14231167159403602480</a><br/>
So the above string is what i need the python script to output.. the original string list can be one or many.
for an html output similar to this:
12227509686562344891
14231167159403602480