PageRenderTime 161ms CodeModel.GetById 87ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/regressiontests/max_lengths/models.py

https://code.google.com/p/mango-py/
Python | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | c4fcbdf3360889b10390a7f1e1c74827 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. from django.db import models
  2. class PersonWithDefaultMaxLengths(models.Model):
  3. email = models.EmailField()
  4. vcard = models.FileField(upload_to='/tmp')
  5. homepage = models.URLField()
  6. avatar = models.FilePathField()
  7. class PersonWithCustomMaxLengths(models.Model):
  8. email = models.EmailField(max_length=250)
  9. vcard = models.FileField(upload_to='/tmp', max_length=250)
  10. homepage = models.URLField(max_length=250)
  11. avatar = models.FilePathField(max_length=250)