That worked! Many thanks!
On 23 February 2018 at 17:38, Dylan Reinhold wrote:
> I would add an is_running flag into the context_data
>
> def get_context_data(self, **kwargs):
> data = super().get_context_data(**kwargs)
> data['is_running'] = Submission.objects.filter(juser=se
I would add an is_running flag into the context_data
def get_context_data(self, **kwargs):
data = super().get_context_data(**kwargs)
data['is_running'] = Submission.objects.filter(juser=self.request.user
jstatus='Running').exists()
return data
Then in your template {
Hi Constantine,
from my views.py:
class status(ListView):
model = Submission
template_name = 'status.html'
def get_queryset(self):
return Submission.objects.filter(juser=self.request.user).
exclude(jstatus='Deleted')
If I could create a parameter say runFlag (True of Fal
Hi Alan,
How did you receive that `object_list`?
You should filter it based on you user and ‘Running’ inside the view. And then
just check if it has count > 0.
I hope that does have sense to you.
Regards,
Constantine C.
> On Feb 22, 2018, at 7:34 PM, Alan wrote:
>
> Hi there,
>
> I am using
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 =
'jonhdoe';
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_li
5 matches
Mail list logo