All purpose type checking

15 views
Skip to first unread message

Lee Hinde

unread,
Mar 24, 2014, 8:01:23 PM3/24/14
to django...@googlegroups.com
I have a search form that lets a user pick the field to be searched from a pop-up. They could enter a date, a string or a number. Sometimes they enter all of the above and I'm only expecting one of the above.

GET:<QueryDict: {u'searchFieldselect': [u'RegNumber'], u'searchValue': [u'Today260713'], u'season': [u'current_season']}>,

I'm not catching type errors very gracefully and I'm wondering if there's a general approach to such things, or if I need to hard code the each test.

Reply all
Reply to author
Forward
0 new messages