I'm making a django project that gets some data from an API and then renders it in a table.
I have this html table, one of the cells is
<td>{{status}}</td>
where status is the status of a service running on a remote server. Started or stopped. Its contained within an html for loop so that each row is generated dynamically based on the data results. Currently the way the table is set up the status is just simply displayed in the table as plain text "Started" or "Stopped". I would like to replace that with a progress bar instead of the text. something like
<td><progress value="100" max="100" style="background-color:green; width:60px; height:20px" ></progress></td>
However I want the bar to be red if the status is stopped and green is the status is started. Is there any way to do this? I know python decently but I don't really have any front end experience. Any help would be greatly appreciated.
Thanks!