Hi there,

I am using Django 2 with Python 3.5

I have this query, simple, in mysql:

select * from submit_submission where jstatus = 'Running' and juser =

Basically, I have a table that tracks the jobs I am running.

In my html, I'd like to replace this part (in red):

{% if *object_list.last.jstatus* == 'Running' %}

<meta http-equiv="refresh" content="5"> <center><h0>Page automatically
refreshed every 5 seconds | {% now "jS M y H:i" %}</h0></center>

{% else %}<center><h0>No running jobs.</h0></center>

{% endif %}

​with something equivalent to my query above where I need to know if
there's at least one job running for a given user.

I've been looking at
https://docs.djangoproject.com/en/2.0/ref/models/querysets ​but I couldn't
work out a solution.

​Many thanks in advance,


I'll cycle across Britain in 2018 for a charity, would you consider
supporting my cause? http://uk.virginmoneygiving.com/AlanSilva
Many thanks!
Alan Wilter SOUSA da SILVA, DSc
Senior Bioinformatician, UniProt
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Cambridge CB10 1SD
United Kingdom
Tel: +44 (0)1223 494588

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to