I'm using the django-storages backends from David Larlet to upload
images to s3 from inside the admin. When i try to run everything I
get an error:
object of type 'NoneType' has no len()
Here is my model:
from django.db import models
from django.core.files.storage import default_storage as s3_storage
class StateFair (models.Model):
Content_Choices = (
('photo', 'Photo'),
('video', 'Video'),
('text', 'Text'),
('audio', 'Audio'),
)
Name = models.CharField(max_length=30, blank=False, unique=True)
contentType = models.CharField('Type of Content', max_length=5,
choices=Content_Choices, blank=True)
thumbNailUpload = models.ImageField('Thumbnail Upload',
storage=s3_storage, upload_to='/news', height_field=None,
width_field=None, max_length=100, blank=True, null=True)
ThumbNail = models.CharField('Thumbnail Name', max_length=50,
blank=True)
imageUpload = models.ImageField('Full Size Image Upload',
storage=s3_storage, upload_to='/news, height_field=None,
width_field=None, max_length=100, blank=True, null=True)
Image = models.CharField('Image name (use jpg, png, etc.)',
max_length=30, blank=True)
Cutline = models.TextField('Caption or Cutline', blank=True)
VideoID = models.IntegerField(max_length=30, null=True,
blank=True)
TextBlock = models.TextField('Text Block', blank=True)
AudioID = models.CharField('Audio FileName', max_length=40,
blank=True)
pubDate = models.DateTimeField('updated', blank=True)
class Meta:
ordering = ("?")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---