RE: Providing defaults to models

2007-06-18 Thread Chris Brand
> > class Link(models.Model): > > link = models.URLField() > > user = models.ForeignKey(User, unique=False) > > text = models.TextField(maxlength = 20) > > votes = models.IntegerField() > > > > I want some of the fields to have defaults, like I want votes to have > > a default valu

Re: Providing defaults to models

2007-06-18 Thread shabda
Also this page, http://code.djangoproject.com/changeset/5202 , says that >> If you specify ``fields`` when creating a form with ``form_for_model()`` >> make sure that the fields that are *not* specified can provide default >> values, or are allowed to have a value of ``None`` So prov