I am trying to use the admin interface for Django to add data to a sqlite database. The input is based on the following model:
My input into the "Add Shuttle Stop" screen is the following (as shown in POST data on the TypeError page):
Giving the Exception Value: unsupported operand type(s) for -: 'str' and 'str'
The traceback is here
Any ideas why this is happening?
asked Feb 28 '11 at 22:42
From the traceback, I see:
Which is a mathematical operation (not supported for strings), but you have specified in your definition:
So, it appears that you're explicitly giving the max_digits and decimal_places attributes string values. I don't think this is related to the input; rather, just that the application is choking when attempting to perform the sanity check on that input (because the sanity check attempts to compute self.max_digits - self.decimal_places).