This code was written before I learned of the beaty of QueryDict.  It should be updated.