Categories
Posts

Disabling the Yoast sitemap’s stylesheet

If, for whatever reason, you’d like to disable the stylesheet that comes with Yoast’s sitemap, add the following piece of code to your theme’s functions.php: In case you are wondering, this is made possible by how Yoast implements the get_output(…) function in class-sitemaps-renderer.php: As you can see, the function calls the wpseo_stylesheet_url filter in line […]

Categories
Posts

Diagrammatic Icons and their Motivations: Central Concepts and Examples

Note: What follows is a linguistic essay I wrote during my time as a student pursuing a master’s degree in computational linguistics. I stumbled over it a few days ago while going through some old data. Given the general scarcity of information about the topic of iconicity, I’ve decided to publish it here. Despite its […]

Categories
Posts

Changing a Django model’s primary key with migrations

Recently, I took on the task of internationalizing a Django app. The app included the following two simple models for tagging user Profiles with a set of pre-defined Tags: “Wait a minute…”, I thought to myself while scrolling through the models.py module for the first time. “How am I supposed to add a translation for […]

Categories
Posts

Serving your Django app’s static & media files with S3 and CloudFront (super fast & easy!)

The following steps will leave you with an AWS setup for serving your app’s files via xyz123.cloudfront.net URLs: Create an S3 bucket (e.g. my-app-bucket-staging) and leave all settings at their defaults Open the newly created bucket and navigate to Permissions → CORS configuration Create an XML CORSConfiguration that defines from which domain the contents of […]

Categories
Posts

Stop Firefox from redirecting to HTTPS

I don’t know anything about your web stack except for one thing: You’ve landed here because you are facing the same annoying problem I had with Django’s SECURE_SSL_REDIRECT. After accidentally enabling this option in my local dev environment, the world’s favorite browser kept redirecting all localhost URLs to their https counterparts. This was super annoying […]