Re: Foreign Key with a default key

2008-11-13 Thread Steve Holden
Luke Seelenbinder wrote: > I'm am trying to make a ForeignKey with a default value. > But when I save i get a "invalid literal for int() with base 10: 'Stat > object'" error > Here is my code: > > from django.db import models > > class Stat(models.Model): > total = models.Integ

Re: Foreign Key with a default key

2008-11-13 Thread Luke Seelenbinder
made a mistake in the c&p the line: definition = models.CharField(max_length='100', default=Stat()) should be: definition = models.CharField(max_length='100',) On Nov 13, 6:35 pm, Luke Seelenbinder <[EMAIL PROTECTED]> wrote: > I'm am trying to make a ForeignKey with a defau