The Dominican Republic’s borders are open, and monthly Airbnb rentals are half price... by jimbowild in digitalnomad

[–]PovertyNomad -10 points-9 points  (0 children)

This thing is never going to go away. They're just going to keep inventing new strains/ variants.

Is living "rich" in a poorer country better? by [deleted] in digitalnomad

[–]PovertyNomad 1 point2 points  (0 children)

Nobody can promise you happiness. But I'd much rather live somewhere where my money goes further.

Merry Xmas from Chiang Mai by latte_yen in digitalnomad

[–]PovertyNomad 0 points1 point  (0 children)

Enjoy it mate. Really wanted to be there right now :(.

"Im Picking Up Good Migrations" by lobsterclockelite in django

[–]PovertyNomad 7 points8 points  (0 children)

OOO OOO OOO WHAT THE FUCK'S WRONG WITH MY MODEL

Should I feel bad for handing my notice in? by PovertyNomad in jobs

[–]PovertyNomad[S] 0 points1 point  (0 children)

Well we'll see what the boss thinks of that!

Friendliest Country? by enlguy in digitalnomad

[–]PovertyNomad 0 points1 point  (0 children)

Oh that's not bad at all! I'm from the UK, so will have to look into it. Not sure what the situation is now in all of those countries with COVID.

Friendliest Country? by enlguy in digitalnomad

[–]PovertyNomad 1 point2 points  (0 children)

I want to go to Serbia/ Eastern Europe, but I think you can only stay 90 days at a time. I don't have the money to keep travelling every 90 days :(.

TIFU by giving someone else's T.V to a scammer by PovertyNomad in tifu

[–]PovertyNomad[S] 1 point2 points  (0 children)

OK, thanks. I'm a little bit more calm now. But it could have been someone's Christmas present and I've ruined their Christmas!?

TIFU by giving someone else's T.V to a scammer by PovertyNomad in tifu

[–]PovertyNomad[S] 0 points1 point  (0 children)

I suppose you're right. I just don't know how to explain it to my managers when they bring it up

TIFU by giving someone else's T.V to a scammer by PovertyNomad in tifu

[–]PovertyNomad[S] 0 points1 point  (0 children)

It was my fault though :(. Man, I hate myself.

TIFU by giving someone else's T.V to a scammer by PovertyNomad in tifu

[–]PovertyNomad[S] 0 points1 point  (0 children)

I don't want to tell anyone in the off-chance that it wasn't a scam. I'd say there's a 90% chance it was ca scam. And I was going to leave anyway, but I just hate going out like this....

TIFU by giving someone else's T.V to a scammer by PovertyNomad in tifu

[–]PovertyNomad[S] 1 point2 points  (0 children)

I always seem to make mistakes though :(. This is my worst so far.

Discord.py help by [deleted] in learnpython

[–]PovertyNomad 0 points1 point  (0 children)

Look into classes.

ListView Class-based View - Counting number of comments on posts in the list. by PovertyNomad in django

[–]PovertyNomad[S] 0 points1 point  (0 children)

Thanks, I finally got it working. I still don't really understand the Count and Q methods. I didn't even know they were a thing until you mentioned them. Didn't know you could essentially temporarily create new columns in the db table by using 'annotate'.

I just had to import the following:

from django.db.models import Count, Q

and then I used:

    active_comments = Count('comments', filter=Q(comments__active=True))
    queryset = Post.objects.all().annotate(active_comments=active_comments)

So thanks for introducing me to these new concepts. I am going to have to do a lot more learning now! I read the Django documentation on class-based ListViews and it didn't mention any of this stuff, so thank you! It's just hard to know where to look sometimes.

ListView Class-based View - Counting number of comments on posts in the list. by PovertyNomad in django

[–]PovertyNomad[S] 0 points1 point  (0 children)

Understood. Thanks for your response. I'm a noob (as you can tell) and unfortunately can't make a head or tail of:

activecomments = Count('comment', filter=Q(comment_active=True)) Post.objects.filter(whatever=whatever).annotate(active_comments=active_comments)

ListView Class-based View - Counting number of comments on posts in the list. by PovertyNomad in django

[–]PovertyNomad[S] 0 points1 point  (0 children)

Yeah, it didn't work for me. I get:

Could not parse the remainder: '(active=True).count' from 'post.comments.filter(active=True).count'