optional fields in django models -
i have following model in django.
class link(models.model): name = models.charfield(max_length=100) url = models.charfield(max_length=100) tag = models.charfield(max_length=100) def __unicode__(self): return self.name
i need url field optional. how do this?
add attribute blank=true
. optionally, can make field nullable null=true
.
Comments
Post a Comment