models.py 462 B

1234567891011121314151617
  1. from django.db import models
  2. from django.core.files.base import ContentFile
  3. from django.core.files.storage import default_storage as s3_storage
  4. from django.core.cache import cache
  5. class Resume(models.Model):
  6. pdf = models.FileField(upload_to='pdfs')
  7. class upcsv(models.Model):
  8. csvx = models.FileField(
  9. storage=s3_storage, upload_to='data/')
  10. csvname = models.CharField(max_length=100)
  11. def __unicode__(self):
  12. return self.csvname