> > 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
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
Hi,
I have a model class like this
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 defaul
3 matches
Mail list logo