Re: Getting 4 four latest objects from django model

2023-02-27 Thread Byansi Samuel
Thanks but it returned an error that, 'ActionGame' is not subcriptabe Do you have a way of solving this typerror? On Feb 27, 2023 11:55 AM, "Muhammad Juwaini Abdul Rahman" wrote: > latest_action= [ActionGame.objects.filter (os='windows', > category='action').latest ('published_date')[:4]] > >

Re: Getting 4 four latest objects from django model

2023-02-27 Thread Muhammad Juwaini Abdul Rahman
latest_action= [ActionGame.objects.filter (os='windows', category='action').latest ('published_date')[:4]] On Mon, 27 Feb 2023 at 16:52, Byansi Samuel wrote: > I got a problem with my queryset. Am trying to get 4 latest objects from > my model but it returns 1 objects the top latest. > > Belo

Fwd: Getting 4 four latest objects from django model

2023-02-27 Thread Byansi Samuel
-- Forwarded message -- From: Date: Feb 27, 2023 11:49 AM Subject: Getting 4 four latest objects from django model To: Cc: I got a problem with my queryset. Am trying to get 4 latest objects from my model but it returns 1 objects the top latest. Below is my code. Any support

Getting 4 four latest objects from django model

2023-02-27 Thread Byansi Samuel
I got a problem with my queryset. Am trying to get 4 latest objects from my model but it returns 1 objects the top latest. Below is my code. Any support and guidance is appreciated. #action/views.py from Action.models import ActionGame latest_action= [ActionGame.objects.filter (os='windows',