1 from django
.db
import models
4 class PersonWithDefaultMaxLengths(models
.Model
):
5 email
= models
.EmailField()
6 vcard
= models
.FileField(upload_to
='/tmp')
7 homepage
= models
.URLField()
8 avatar
= models
.FilePathField()
10 class PersonWithCustomMaxLengths(models
.Model
):
11 email
= models
.EmailField(max_length
=250)
12 vcard
= models
.FileField(upload_to
='/tmp', max_length
=250)
13 homepage
= models
.URLField(max_length
=250)
14 avatar
= models
.FilePathField(max_length
=250)