Replies: 3 comments 3 replies
-
|
See this example, which inserts an email link in a table cell. In your example above you appear to be using single quotes inside the Finally, if your |
Beta Was this translation helpful? Give feedback.
-
|
Miguel, thank you very much for your help. I'm almost there :-). I got the formatter to work and able to create an href. But now I would like to pass a parameter to my url. I thought something like the following would work, but it looks like the '$' is unexpected by jinja. const url = {{ url_for("judgesdb.update_event", event_id=${cell}) }}; looking to use url in html( I'm guessing that jinja doesn't like '$', but do not know how to get around this error. I'm an old C programmer writing python like C. Thanks for any help. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks again for all your help. I was beginning to think this was the case and now I have to learn JavaScript . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, first time question asker here.
I am trying to add some HTML code into a table based on Miguel Grinberg's Beautiful basic table. I am still a novice at Flask, so please forgive me if this is a "stupid" question. When I use the following, the table displays as expected:
new gridjs.Grid({
columns: [
{ id: 'event_id', name: 'Event ID', sort: false }
...
But when I add the following formatter sequence, the table fails to display.
new gridjs.Grid({
columns: [
{ id: 'event_id', name: 'Event ID', sort: false,
formatter: (cell) => html('${cell}')
},
...
What am I doing wrong? Is there a way to add HTML (and specifically href) to a table cell?
Thank you for your time and consideration.
Best regards,
ET
Beta Was this translation helpful? Give feedback.
All reactions