2007-09-20 07:33:57 +08:00
|
|
|
from django.db import models
|
|
|
|
|
2011-10-14 05:34:56 +08:00
|
|
|
|
2007-09-20 07:33:57 +08:00
|
|
|
class PersonWithDefaultMaxLengths(models.Model):
|
|
|
|
email = models.EmailField()
|
2016-12-01 06:05:31 +08:00
|
|
|
vcard = models.FileField()
|
2007-09-20 07:33:57 +08:00
|
|
|
homepage = models.URLField()
|
|
|
|
avatar = models.FilePathField()
|
|
|
|
|
2013-11-03 12:36:09 +08:00
|
|
|
|
2007-09-20 07:33:57 +08:00
|
|
|
class PersonWithCustomMaxLengths(models.Model):
|
2009-05-08 02:06:22 +08:00
|
|
|
email = models.EmailField(max_length=250)
|
2016-12-01 06:05:31 +08:00
|
|
|
vcard = models.FileField(max_length=250)
|
2009-05-08 02:06:22 +08:00
|
|
|
homepage = models.URLField(max_length=250)
|
|
|
|
avatar = models.FilePathField(max_length=250)
|