A month without internet in the office…
WordPress Core contributions by (tickets) numbers – 2023 edition
After a year, something is changed? Not so much, the numbers after all stay the same.
My free software and open source activities of March 2023
What has happened this month? In the meantime, to read the previous report, go here. My projects https://daniele.tech/2023/03/how-to-do-a-django-cache-decorator-that-exclude-by-url-parameters/ https://daniele.tech/2023/03/how-to-set-x-robots-tag-in-htaccess-for-any-query-string/ WordPress The initiative that I was waiting since a lot is a triage of old Core tickets, I wrote a guide about how to do that activity. I just reviewed some other tickets and working on […]
How to set X-Robots-Tag in htaccess for any query string
It is just a note for me to remember this trick: RewriteCond %{QUERY_STRING} . RewriteRule .* – [E=MY_SET_HEADER:1] [QSD,R=302,L] Header set X-Robots-Tag “noindex, nofollow” env=MY_SET_HEADER It is based on the suggestion here but with a change to support if there is any query string in the URL. […]
How to do a Django cache decorator that exclude by URL parameters
After asking on Reddit I started digging on internet looking other projects with custom cache decorator and mixing various I was able to achieve this. “””Custom cache decorator.””” from django.http import HttpResponse from django.views.decorators.cache import cache_page as original_cache_page from datetime import datetime from functools import wraps def cache_page(timeout, *, cache=None, key_prefix=None): “””If logged error, if […]