Hi,
I think the problem is tyhat you're using the wrong type of field in your form.
A ChoiceField, like the documentations says [1], returns '' for an
empty value, i.e. when
you do not select an option. Trying to save an empty string into ans
INT field in the database
will throw the error you
That was a very good guess. I tried it but it didn't work.
On Apr 13, 12:46 pm, johan sommerfeld
wrote:
> You could try using initial=0.
>
> /J
>
> On Tuesday, April 13, 2010, geraldcor wrote:
> > Hello all,
>
> > I know the error "invalid
You could try using initial=0.
/J
On Tuesday, April 13, 2010, geraldcor wrote:
> Hello all,
>
> I know the error "invalid literal for int() with base 10: '' " has
> been discussed a lot in the past, but this seems to be unique to my
> situation.
>
> I have 2 choice fields
I happened to be stopping by to post my own question, and I don't know
if this is the answer or not, but have you tried adding the argument
blank=True to your model field?
http://docs.djangoproject.com/en/dev/ref/models/fields/#blank
--
You received this message because you are subscribed to the
Hello all,
I know the error "invalid literal for int() with base 10: '' " has
been discussed a lot in the past, but this seems to be unique to my
situation.
I have 2 choice fields as defined below for both the model and form:
models.py
class Checkin(models.Model):
...
content =
5 matches
Mail list logo