> > 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 value of 0. How can I achieve this. I dont seem to find any
> > documentation for this, but seems to common a case to not be possible.

http://www.djangoproject.com/documentation/model-api/#default

Chris




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to