Monday, March 24, 2014

All purpose type checking

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.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment