Thank you, works well now :)
ke 12. syysk. 2018 klo 11.37 Andréas Kühne (andreas.ku...@hypercode.se)
kirjoitti:
> Hi Mikko,
>
> It works correctly the way you have written it. Look at the code you have
> written:
> t = time.time()
>
> def index(request):
> newstest = NewsData.objects.filter(c
Hi Mikko,
It works correctly the way you have written it. Look at the code you have
written:
t = time.time()
def index(request):
newstest = NewsData.objects.filter(created__gt= t -
300).order_by('-created')
newstest1 = NewsData.objects.filter(created__lt= t -
300).order_by('-created')
Hi, I still have a small issue here and couldn't figure it out.
I want to divide my items based on the time created. The division point is
5 minutes and I want that point to be seen in my webpage. However when I
made the division point, Django doesn't update it (the items that become
older than 5
Thank you.
-Mikko
su 9. syysk. 2018 klo 16.49 Jason (jjohns98...@gmail.com) kirjoitti:
> You've defined two views which pass in different querysets to be rendered.
>
> so if you hit index, you get the first queryset rendered but not the
> second because newstest1 is not rendered at all. and vic
You've defined two views which pass in different querysets to be rendered.
so if you hit index, you get the first queryset rendered but not the second
because newstest1 is not rendered at all. and vice versa.
solution is to add newstest1 to index and pass both querysets as context to
the rende
5 matches
Mail list logo