Brad's Blog

web dev, django, running, food, or whatever

Published: 2008-12-04

radiohead - 15 steps video

Fun awesome music

Updated... BIZRADv2... is a bit better.rh.createWidget("BIZRADV2", "4G5D1F9F2F0G8I9H1F5F2E0D5E1F7C8F5GaK3E1G5D1C2E4C8C9C7C6F4D5DaD9E8D5D1K9D8D7D1D0G5D2E1D4DaD9D6D3E5D1C2E5D3D4DbD0D4E1D5DaD9D8C7H2D4E9E7D5C1E3D1D2D5D7C8EaD9D1H3D1D7DaE6D5C1D3E7F4D8CaD9DaD1C2C1C0F2C1C2D0D7D8D6E9FaH3C4F1G3H5F4E0E1G8DaC9D3E2G1D5E8C7E6E4C3E0CaFbD7J");


Published: 2008-12-04

That Looks about Right

Programming meme

history | awk '{ print $2 }' | sort | uniq -c | sort -rn | head 152 cd 145 ll 73 vi 20 rm 18 svn 13 exit 9 ls 8 grep 7 php 5 wgetvia b-list.org


Published: 2008-11-24

A simple Django example with Ajax

Javascript ajax django

I often employ Ajax in HTML forms in order to update the list of options in select elements. For example, suppose a form consists of two select elements, and the options in the second depends on the values selected in the first. A simple example of this might be an Automobile Rental website that lets you choose the type of vehicle as well as the color. Not all vehicles come in the same color, though, so you might have a ...


Published: 2008-11-19

Extending Django's MultiWidget: SplitSelectDateTimeWidget

Python django

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 ...


Published: 2008-11-18

SelectTimeWidget: A custom Django Widget

Python django

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 ...


Published: 2008-11-17

Soup's On! And it IS Beautiful!

Programming Python web

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 ...


Published: 2008-11-12

Wordle - Cool Word Clouds

Fun

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!


Published: 2008-11-09

BarCampMemphis, the Day After

#bcmem BarCampMemphis django

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 ...


Published: 2008-10-22

A topic for BarCampMemphis

#bcmem BarCampMemphis Python django

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 ...


Published: 2008-10-05

on beards

Fun beard

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