Walking down my street one day I found this very charming, bright orange vintage TV in a dumpster from some old person cleaning out their house. It caught my eye and I couldn’t let it go to waste, so I took it home and gave it a new life as a window into the past with everyone’s favourite retro games. Key features include:
I’ve been building my first web application in Django, involving some customised exception handling, logging and auditing. I figured middleware would be the most appropriate mechanism to implement these features, since I want them to apply to all views.
However there are actually multiple middleware components and this started to raise confusion about where or how to implement each piece of functionality. I first needed to get my head around these different components and how they interacted with the request-response flow.
The official documentation describes the different middleware types, which can all be implemented by a single middleware class:
Displaying content from a database table on a web page is a common requirement, however often the way the data is stored in the back-end isn’t quite how you’d like it to look on the front-end. For example, column names are often short-hand and not very informative, values may be abbreviated to save space, and timestamps are often standardized to UTC.
Here’s a simple class I made for one of my projects which helps to translate table headers, perform value lookups for particular fields, and handle timestamp timezone conversion and formatting.
First, we’ll look at an example of some raw…
I came across a few similar projects online (such as Ben Heck’s build) and figured it would be a really cool thing to try and make. Many others involved fully 3D printed enclosures but ended up looking kind of blocky because unless you’re a CAD wizard it’s difficult to make really sleek-looking ergonomic designs. I figured I’d take advantage of someone else’s hard work by using an existing console controller and attaching an enclosure for the screen and other electronics. The Wii-U Pro controller has lots of space inside it and there are plenty of knock-offs on eBay so I…
Tech projects and maybe some other stuff