Blog postings
Having migrated to Django 4.0 a while back, time for another upgrade to the latest 5.2 and I also did Python to 3.13 at the same time. Neat.
Main headaches:
Logging out now has to be done via POST
. This has to do with some kind of attack mitigation. Whatever. Implementing this wasn't too bad really. Where I had unit tests for logging out I had to change the method from response = self.client.get(reverse('logout'))
to response = self.client.post(reverse('logout'))
; similarly the base template had to be updated so the logout link was no longer just a simple anchor but a form submission. In the template remove:
<a class="dropdown-item" href="{% url 'logout' %}">Log Out</a>
and replace with
<form method="post" action="{% url 'logout' %}"
style="display:inline;">
{% csrf_token %}
<button type="submit" class="dropdown-item"
style="display:inline; cursor:pointer;">Logout</button>
</form>
Google deprecated their new url notification service, so the thing which pinged that had to be removed. I think I broke the IndexNow! equivalent too but oh well
Timezone handling has been "improved" in Django. You now need to import pytz
and replace references to timezones with pytz
equivalents. Not very hard: a few tzinfo=utc
became tzinfo=pytz.UTC
, mostly in migrations
The captcha
module had been deprecated too, so I had to replace it with django_recaptcha
in the installed apps in the settings and update a couple of forms to refer to the new module.
Apart from that there weren't any big headaches although getting pip
to behave with the versions was a pig. Update more often...
I had my first website back in the nineties. It was a bunch of static pages uploaded onto my (really, my father's but don't tell him) ISP's web server. As part of the monthly fee you got a few MB of space and no fancy features. The page has been lost in the sands of time, which is probably for the best, as if it was still discoverable then LLMs would produce even more cringy content than they currently do. However actually running the website was easy. I had a bunch of html files that I edited in notepad, some images, and to do an update was
C:\website> ftp
> open server.isp.co.uk
> username
> password
> put *
> bye
and that is how I talked to the world. Not even any encryption. Madness. The HTML was primitive and the formatting poor, but anyone could run a wesbite. Even back then it was a niche activity for nerds but the fact was it was possible. Millions of people all over the world did it. Some of this stuff is still up there, slowing being rotted away but you can find these archeological charms if you look for them.
Years pass. I go to uni and they offer a personal website with CGI capabilities (no database!) to every student with an account (this is everyone). Intoxicated by the possibilities I use PHP to produce a content management system. But not really, it was essentially a few blog posts (before blog was a noun) that were linked into the main page which I maintained by adding them manually to the list. The title of the page was set by a GET string so a couple of problems were caused when people would change my published title into an insult and send that to other people for japery reasons. I "had" to use XHTML and CSS to produce the website too, although I cannot recall why, but at least it rendered nicely despite the rank amateurism elsewhere.
I had a look for this website, but it, too, has been lost to the sands of time. Probably for the best as it was a cringefest. I even got a few emails from people who took offence to some of my posts. Real, genuine, unexpected interactions with other humans, even if they were mad at me. No encryption either, unless the uni web site did that automatically. I had a hit counter (opened a file, read an int, incremented it, wrote it out, saved) which looking back had a race condition but at the same time got to five digits of viewers probably accurately. Probably mostly humans too, back then. Updating the website was just ftp (but at least sftp to stop people snooping on what I was making available publicly). Once I clobbered my local drive and had to restore it from the web server - a valuable lesson in backups.
The point here being that websites had become a bit tricky to do even by the early 2000s. You could, just about, use the old way if you wanted.
Even more years pass. I now have this edifice. A simple blog now requires the following:
- it is in django, so you need to know python
- you need to figure out docker containers to get fly.io working, which is non trivial and seems pointtless for a personal website
- heroku was better as you could just git push to it but they wanted money so that stopped
- files are stored in an amazon s3 bucket so you need to figure out AWS and get django talking to it
- you also have to use some kind of cloud distribution system instead of s3 hotlinking so that is even more AWS fiddling
- you "have" to use certificates so you have to figure out how to get AWS to do that as well (but it happens automatically once you get it set up... but why is it needed at all)
- django templating system is a powerful abstraction layer but for a blog? really?
- the database that holds the posts is some cloud postgres instance so you need to get that talking to django and aws and DNS
- the email feature is again a cloud service which needs fifteen integrations
- did I mention DNS, half the website maintenance is DNS updates
- if you want google to find you then you have to set up some url pinging system because of course you do, and really you have to set up sitemaps so bots can index your site automatically
So really if you want a personal website and you aren't a huge dweeb like I am your best bet is to set up a wordpress or blogger website, where you will be ignored, but hey at least you can do it more easily than my primitive ftp set up thirty years ago.
I cannot help but think this is unconsciously deliberate in some way. The web is a technological marvel for content delivery but now you are meant to marvel at the technology rather than the content. The days when people would set up small websites for their hobbies and interests have gone, and it was nice while it lasted. The modern replacement of ephemeral social media communities subjected to the whims of an unknown and unaccountable surfacing algorithm does not quite cut it.
These two like each other I promise!
Currently staying just this side of Ilfracombe after a family wedding. I really like this area although the place is dead with it not being tourist season abd the roads are patrolled by drunk drivers. Anyway. Here's the view.
Over the summer we did a tour of the Western Isles. It's a great place. Even starts off great with a long trip on calmac from Oban past the Isle of Mull and the Ardnamyrchan peninsula before the open water. Here are some images.
boat from Oban
Boat from Barra hotel
A beach on Barra in customarily poor weather
And some ovine friends