/tests/regressiontests/max_lengths/models.py
Python | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | c4fcbdf3360889b10390a7f1e1c74827 MD5 | raw file
Possible License(s): BSD-3-Clause
- from django.db import models
- class PersonWithDefaultMaxLengths(models.Model):
- email = models.EmailField()
- vcard = models.FileField(upload_to='/tmp')
- homepage = models.URLField()
- avatar = models.FilePathField()
- class PersonWithCustomMaxLengths(models.Model):
- email = models.EmailField(max_length=250)
- vcard = models.FileField(upload_to='/tmp', max_length=250)
- homepage = models.URLField(max_length=250)
- avatar = models.FilePathField(max_length=250)