Google maps geocoder
Found a batch geocoder for Google maps a couple of weeks ago. It's pretty simple, and returns accuracy and status codes to help weed out the addresses you might need to check by hand. (Yay for not...
View ArticleNew work project up
Online school directory for El Paso and Teller counties, Colorado, USA (broken now). (The much better, non-corporate mush version is here on my site. [Also dead now, as I don't want to update the code...
View ArticleArrrrrrrrrrrgh.
I like CodeIgniter so far (I've been fiddling with it on and off for a bit), but I've run into an issue that is driving me insane, so if anyone sees a typo that's causing the issue, I'd appreciate it...
View ArticleDjango snippet — Template tag: split list to n sublists
This is the code for a Django template tag I adapted (also posted here). It was based on this snippet, adapted to split a list into n number of sublists, e.g. split a list of results into three...
View ArticleI just don't get it. (An "I ♥ SQL" rant)
What's so bad about liking SQL? About enjoying the beauty of a really damned well-written and concise query? Seriously, I just don't get the hype about ORMs versus writing the queries yourself. Don't...
View ArticleAnother simple but useful Django trick
Say you need the full URL of the current page you're displaying that you need to use on the template of that page, for example, to add links to Facebook, Delicious, etc., and you don't want to have...
View ArticleDjango, MySQL, and Windows 7 64-bit installation tips
Here are the solutions to a few annoying things that caused issues when I was installing Python, Django, and MySQL on a new Windows 7 64-bit laptop. 1. Be sure to set your PYTHONPATH variable. After I...
View ArticleHtaccess trick
Here's what I ended up putting in an .htaccess file for each of the various sites I run/own/manage to participate in the SOPA/PIPA protest today: RewriteEngine On RewriteCond %{TIME_HOUR}%{TIME_MIN}...
View ArticleDjango trick: using named admin urls in templates
To add a link to an admin page on the user-side of your django site, you can use the named url patterns. (Seems like a simple and fairly straightforward thing to want to do, but I frequently find that...
View ArticleDefault (initial) value in Django's admin for a choice field
I was trying to set the initial value for a choice field in the admin like this: from django import forms from django.contrib import admin from mptt.admin import MPTTModelAdmin from author.models...
View Article