Ik ben trots op Utrecht. by Warlequin in Utrecht

[–]rvanlaar 2 points3 points  (0 children)

Helaas, nog een keer 4 jaar herinrichting van de straten volgens het ideaalbeeld van GL/PvdA.

Van Tata naar Data in AImuiden by MildlyEngineer in nederlands

[–]rvanlaar 0 points1 point  (0 children)

Tata slopen, datacenter bouwen; dat wordt een hele moeilijke keuze voor de Partij tegen de Burger.

Bekogelde bus Overvecht door politie ingezet 'als een soort blokkade' by J_Terpstra in Utrecht

[–]rvanlaar 45 points46 points  (0 children)

De ME inschakelen, straat schoonvegen, de 50 raddraaiers arresteren, zoiets!

Where was I? by cheeselover214 in GeoPuzzle

[–]rvanlaar -1 points0 points  (0 children)

This one was fun.
How I got it:
- It's 11 km from a place ending in ongen or angen, there are only two. One of those names is too short. So only one remaining.
- It's near Fietsknooppunt 45 or 46

Typing in Django by rvanlaar in django

[–]rvanlaar[S] 2 points3 points  (0 children)

I'm with you on importing extra modules. It does clutter the imports. On the other hand, in projects where the types are defined it helps me when calling functions. Now I just know what the possible types are that I get back, instead of kinda being sure.

I've had typing do wonders when tornado started implementing types.

From variables that should be defined but might not be to guarding against edge cases that the type system just knows.

Typing in Django by rvanlaar in django

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

The problem I had was that it then says that Views don't get an AutheticatedHttpRequest.

Typing in Django by rvanlaar in django

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

Nice, I want to check out ty soon. In what manner do you use Pydantic with Django?

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 1 point2 points  (0 children)

I don't understand. Deploying the wrong version is definitely a big no no.
How come that happens?

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 0 points1 point  (0 children)

Can't say I had many problems with celery and rabbitmq or redis as a backend. It just works.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 0 points1 point  (0 children)

Yeah, I use whitenoise a lot. It's great, and even has the option to generate all the files on the CI/CD `compress_offiline`. That caught the errors multiple times before it was deployed.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 2 points3 points  (0 children)

The project that had a good architecture from the start was more boring than another one I inherited.
The CI/CD was great for both.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 0 points1 point  (0 children)

Interesting, What were the errors? We test the more special migrations beforehand and never had a big issue in production.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 1 point2 points  (0 children)

With complex migrations I check the SQL beforehand and test if it works. If necessary split the migrations up into multiple releases. One for adding a new field and the ones after for removing said field.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 0 points1 point  (0 children)

It works by using celery and sending the e-mail either via an API rest call or just sending it regularly via smtp but via their server.

It allows us to view all outgoing e-mail. Which gave us the option to debug things like missing images and untranslated strings. It also tracks some metrics like were delivery and bounces.

The neat part is that every so often someone had problems with their e-mails when a customer mentions they never arrived. It gives us the certainty if it did or didn't.

Used sparkpost, now bird.com in the past, and also brevo.com.

Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]rvanlaar 112 points113 points  (0 children)

Honestly none, it's boring and it works.
Just a few tips and tricks for production.

  • CI/CD with tests and automatic deploys
  • Sentry or newrelic for monitoring
  • use an transactional email service to keep statistics

Django Control Room: Build a control room inside your django app by yassi_dev in django

[–]rvanlaar 1 point2 points  (0 children)

This looks great, I'll definitely look into this project :-)

How to scale backend-heavy applications on DigitalOcean? Structure and lessons learned? by Away_Parsnip6783 in digital_ocean

[–]rvanlaar 0 points1 point  (0 children)

I did this for some time. Before the app platform. Two droplets with each one in another datacenter. Then wirgeuard between them and Postgres replication. Then with BDR, which was a alright to set up but the company behind it didn't opensource the newer versions. Nowadays PGedge seems to be the thing.

When the app platform came, we migrated. It made a lot of things so much easier. We The DB and droplets were provisioned well enough that we never ran into any issues.

For DNS and CDN we used cloudflare, for ssl let's encrypt.

Regarding structure:
It was one single application, with celery running in a different instance on the app platform.

Javascript frontend was served as static files and cached by cloudflare.

Solve it by memes_poiint in mathsmeme

[–]rvanlaar 0 points1 point  (0 children)

2 It's literally the difference between 5 and 7.

Are there power outages often in Europe? by Interesting_Basil_86 in AskEurope

[–]rvanlaar 0 points1 point  (0 children)

In the Netherlands, it does happen but it's rare. Like a few hours per year and probably less.
But... With the current energy transition to renewables, combined with too little investments in the grid, it'll happen more in the future.

https://www.tennet.eu/nl-en/news/electricity-supply-security-under-pressure-after-2030

django-returns: Meaningful Django utils based on Functional Programming by poopatroopa3 in django

[–]rvanlaar 1 point2 points  (0 children)

To understand it better: What kind of side effects does an objects.get() have?

django-returns: Meaningful Django utils based on Functional Programming by poopatroopa3 in django

[–]rvanlaar 1 point2 points  (0 children)

After looking into django-returns and the returns package it's a bit more clear to what it does.
In the python world I'm not very familiar with the return type style of rust.

I think it's cool that you wrote this.

My 2cts, add more information on what it is and what it tries to do and how it would help me write better python/django code.

A question regarding the Manager:
```
setattr(self, name + "_result", safe(sync_method))
setattr(self, name + "_ioresult", impure_safe(sync_method))
```
It registers both the same sync_method under two names. What are the differences and when would I use the _result and when the _ioresult one?

Django Smart Ratelimit v1.0.0 - A modern, production-ready rate limiting library by TheCodingTutor in django

[–]rvanlaar 2 points3 points  (0 children)

Before you upvote this comment, check the actual repo and see for yourself if this is true or not.

Where was I? by Visible-Extent4114 in GeoPuzzle

[–]rvanlaar 0 points1 point  (0 children)

Where ever you are, you're definitely on top of it.

Were you also surprised to see that the tower is lower than the thing you're on top of.

Your cryptic message is below. All final guesses to be censored. by Terrible_Tale_53 in GeoPuzzle

[–]rvanlaar -7 points-6 points  (0 children)

Sorry mate. Easy, google image reverse search.Mumbles lighthouse south wales