Brad's Blog

web dev, django, running, food, or whatever

Extending Django's MultiWidget: SplitSelectDateTimeWidget 2008-11-19

This entry is an update to SelectTimeWidget: A custom Django Widget. The Problem: I want to use a Single widget object for a DateTimeField, but I want it to consist of select elements with appropriate options for month, day, year, hour, minute, and second. Additionally, I want to be able to specify a 12-hour format, so I would then need options for "a.m." and "p.m."Fortunately, Django's SelectDateWidget (from django.forms.extras.widgets) takes care of the ...

SelectTimeWidget: A custom Django Widget 2008-11-18

I've been meaning to write this blog post for quite some time...Django Models provide a way to create a definitive source of data for web applications. Written as a python class, a Django Model consists of Fields that (among other things) define a type for your data. Django's Forms provide a mechanism for generating HTML form elements and validating user input. A sublcass of Django's Form class is the ModelForm which essentially creates a Form based ...

Soup's On! And it IS Beautiful! 2008-11-17

Here's the problem: There's a BAJILLIION static html pages sitting out on a server, and I need to migrate all that content to a new Database-driven CMS. Additionally, I need to get rid of a lot of non-essential hard-coded presentational markup (like align="center" or font="whatever") and any inline styles that may exist... (you know, because external CSS is the way to go).I could spend hours and hours just copy-/pasting stuff... but meh. Enter BeautifulSoup ...

Wordle - Cool Word Clouds 2008-11-12

I've just run across Wordle, a nifty app that generates artistic word clouds based on text you give it. It also consumes rss or atom feeds, so you can do something like the image below:It's quite interesting what sort of things stand out in this... I just happened to notice that everyone want great web!

BarCampMemphis, the Day After 2008-11-09

I think everyone is in agreement: BarCampMemphis was a tremendous success! I want to personally thank everyone who came to my Zero-to-Wiki in 30 minutes with Django session, and I also want to remind everyone that the Presentation and the code is freely available!There were many great sessions available throughout the day, but I want to list the ones I got to attend... all of which were just excellent:Dave Barger's LinkedIn tipsWill Murphy's insights on what ...

A topic for BarCampMemphis 2008-10-22

I've recently watched the What is BarCamp video, and I've been thinking about a Django-related topic. I'm sure there are plenty of web developers out there looking for a better way...Now, I've only been using Django for about 5 months, but I'm pretty sure I could give any interested kindred souls a good jump-start. And so that's what I'd like to do... show by example.The Example? Why not a wiki... It ...

on beards 2008-10-05

I just ran across an interesting beard video on vimeo. Lots of cool links including, the World Beard and Moustache Championships, and the BLF. Fun stuff.

hack your iphone earbuds... 2008-09-23

I've been complaining (inwardly) about my iPhone's earbuds since I first tried them on. Who knew it was so easy to just hack them!iPhone / iPod Touch Headphone / Earbud Replacement

iTunes Genius Lies! 2008-09-16

I begrudgingly turned on the Genius Sidebar in iTunes 8 and now it's showing me the "Top Songs You're Missing"... except, I'm not missing them! Surely Apple doesn't think I should purchase music that's already in my library! Maybe this is just a bug... or maybe iTunes is confuzed because my album is "Weezer (Blue Album)"... who knows.

Pondering a Robotic Lawn Mower 2008-09-13

Last weekend my gasoline powered lawn mower died. This prompted a search for a new mower, during which I stumbled upon some of Friendly Robotics' Robomow; a line of battery-powered robotic lawn mowers. Now, I have to admit that for the past 15 years or so, every time I've mowed a lawn, I've thought about the possibilities of a robotic lawn mower, and I'm not at all surprised that there's a company producing these. At first ...