For many years this website ran on Django. It worked well, and at the time it made sense. I wanted to learn Django, run the application myself, and generally understand every part of the stack.
Last year I moved the site to Hugo, hosted on GitHub Pages, with GitHub Actions handling the build and deployment. I had been wishing to move to a static site for ages, and Copilot made that much easier.
Read AI as MaintainerI recently had the need to add some HTML to the label for a form field using Django. The solution is pretty easy, except I didn’t see it written explicitly anywhere, and I missed the memo of the function I should be using.
My form first just had the HTML in the form label as so:
from django import forms class AccountForm(forms.Form): name = forms.CharField(widget=forms.TextInput(), max_length=15, label='Your Name (why?') However, when I displayed it, the form was autoescaped.
Read Using HTML in a Django form labelNearly everyone on our team stayed up the entire night; most of us didn’t sleep at all.
It had been years since I last pulled an all-nighter, but they had always been for good causes. I had just completed another one and had an immense amount of fun in the process. The reason? GovHack.
GovHack aimed to encourage the Australian government to make as much information openly available as possible. The challenge was to take the scattered pieces of information already available and turn them into useful tools or visualisations for the public.
Read GovHack 2009The date is June 25, 2007, and I’ve sinned. Let me explain.
I’ve been involved in technology for quite some time and have long been opposed to Facebook, MySpace, and Friendster. I never felt any urge to join; I always thought people spent too much time updating their profiles instead of writing something useful or insightful, or doing something productive. Two months ago, I broke my rule and joined MySpace for a single day because I needed to contact someone.
Read Forgive Me, for I Have SinnedNote: Colddirt’s source code is run from Django SVN, check out on May 10th-ish. If you are using a newer branch, some things have changed. i.e. clean_data has been renamed cleaned_data. Remember to check the BackwardsIncompatible page in the wiki.
Part 1: Simple AJAX with Django
Part 2: Django Newforms Usage
Part 3: Search with Django
Part 4: Django’s Syndication Framework (simple)
Part 5: Django’s Syndication Framework (little more complex)
Feel free to see the source code from Github.
Read Colddirt InformationBack in the day the barrier to entry for the Internet was quite high. The technology used required a steep learning curve, the equipment extremely expensive, and sometimes even hard to acquire. Fast forward to 2007 and things have certainly changed. If you know any tech people you can likely get free hosting for a small website, and even more demanding websites can be hosted for not much. The cost of dedicated servers has dropped even more. And the final kicker: web services. I’ve started to think of some web services not as a service, but more like outsourcing requirements.
Read The Risk in Risk MitigationWell, I’m basically all done upgrading to Version 3.0, I deserve a cake or something. Here’s the 411:
For the past few years I have been using Mambo, then Joomla, to manage the content on my site. It worked quite well, and was in PHP, so I could add or remove any code. Indeed, I’ve written a decent amount of PHP apps. In early 2004 I wrote a PHP platform to track adventures people had gone on, and networked people seeking to go on adventures with each other. I never marketed it, and mainly created it to learn PHP, but it was a CMS (Content Management System), and a little more. Late in 2004 I wrote another blog-esque platform for my second trip to Europe. It was pretty cool, I’ll admit: …
Read Version 3.0 Part TwoTo all my loyal (but most likely few, and mainly with the same last name as me):
I think I’m going to redo the structure of my site, yes, it is about time. I’ve been using a CMS (Content Management System) to categorize everything, but it is time to ditch that and write something. Time to stop being lazy. Time to stop procrastinating. Time to learn something new.
Let me make this clear: version 3.0 surely won’t be based off PHP.
Read Version 3.0Here’s a tip for Firefox. An extension called BugMeNot enables you to right click on “general” forms and say “Login with BugMeNot.” Firefox will call the BugMeNot extension which looks up in an external database login information. For instance, www.nytimes.com requires a login, which is a great place to test it out.
http://extensionroom.mozdev.org/more-info/bugmenot
Read Firefox + BugMeNotA developer just showed me an interesting framework to produce python-backed sites VERY quickly. This is mainly for you Ian, it natively supports AJAX as well. Here’s the link:
http://www.turbogears.org/
I watched the demo, pretty interesting.
Read Python + Web Developement