Django: disable inline option to add new referenced objects
The Django Web Framework makes it quite easy to add new referenced objects in the admin menu. Read more
The Django Web Framework makes it quite easy to add new referenced objects in the admin menu. Read more
A simple task, or so I thought: in a Jinja template keep track of the number of items in a loop. And then use that count afterwards. Disclaimer: the number of items is not equal the number of times the loop runs, so I can’t use the loop variables. Turns out that Jinja has other opinions, and variables inside a loop are all local. When a variable is changed inside the loop, the scope of the variable stays local, and once the loop ends the original value of the variable is restored. That’s even true for variables which are created outside the loop. Read more
Installing a new Raspberry Pi is always the same few steps, and still I have to look them up almost every time. Here is the summary. Read more
In one of my Ansible Playbooks I’m updating Let’s Encrypt certificates. Because the Playbook is rather long, I want to make sure that Ansible is not spending cycles on a certificate which is not about to expire. Hence I wrote a small filter plugin, which receives the certificate path and the number of days the certificate must be still valid. This plugin is used to filter out any “good” certificate which does not need to be updated. Read more
If you use pure PHP (no database abstraction layer) with PostgreSQL, you may run into the problem that your BOOLEAN columns are not recognized by PHP but the value is instead returned as a string. Read more