Date: 26/6/21 04:38 (GMT+10:00)
> To: Django users
> Subject: Re: DRF | Django | Up votes | Down Votes
>
> Ryan Thank you so much. I will give it try. and let you know about the
> results
>
> On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski
> wrote:
>
>> On Thu, Jun
HE lmbo pop l9m6oo9k--(Unsigned mail from my phone)
Original message From: DJANGO DEVELOPER
Date: 26/6/21 04:38 (GMT+10:00) To: Django users
Subject: Re: DRF | Django | Up votes | Down
Votes Ryan Thank you so much. I will give it try. and let you know about the
resultsOn
Ryan Thank you so much. I will give it try. and let you know about the
results
On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski wrote:
> On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote:
> > Hi Django experts.
> > I am building a Django, DRF based mobile app and I want to have
> >
On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote:
> Hi Django experts.
> I am building a Django, DRF based mobile app and I want to have
> functionality of up votes and down votes for posts that user will post.
> So what I want to say here that, if an user upvotes a post then it sh
Chetan I got what you're saying. so how diff_votes will be updated? do have
I to apply the same logic as Oba discussed above?
and yes by calculating the up and down votes at the same time was that, if
a user up votes my post and another user down votes my post then should be
ranked accordingly.
mea
You should have a field on Votes Model diff_vote as integerfield, which
will be updated when a user upvote or downvote.
WHY??
Calculating this value on list view will result in higher latency.
So we can dump that calculation on creating on updating.
What do you mean by calculate the up votes and
Oba Thank you so much. and let me try it.
and one more thing that I want to ask that how can I calculate the up votes
and down votes at the same time? as Facebook likes and dislikes do. can you
guide me in this regard?
On Fri, Jun 25, 2021 at 11:15 AM oba stephen wrote:
> Hi,
>
> One way would b
Hi,
One way would be to create an extra field to track the difference in both
fields and then in your meta information on that model set the ordering to
that field.
Another approach which is better is to do something like this.
Votes.objects.extra(select={'diff': 'upvote - downvote'}).order_by('
Is there anyone who can help me here?
On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER
wrote:
> Hi Django experts.
> I am building a Django, DRF based mobile app and I want to have
> functionality of up votes and down votes for posts that user will post.
> So what I want to say here that, if an
9 matches
Mail list logo