from django.db import models
from time import gmtime, strftime
import shortuuid

def generate_storage_name(instance, filename):
    instance.filename = filename
    extension = filename.split('.')[-1]
#    return "%s/%s.%s" % (strftime('%Y-%m-%d', gmtime()),
#                         str(uuid4()), extension)
    return "%s/%s.%s" % (strftime('%Y-%m-%d', gmtime()),
                         shortuuid.uuid(), extension)

class LogCollection(models.Model):
    received_on = models.DateTimeField(auto_now_add=True)
    description = models.TextField(blank=True, null=True)

class LogFile(models.Model):
    collection = models.ForeignKey(LogCollection)
    filename = models.CharField(max_length=1024)
    filetype = models.CharField(max_length=32)
    fileobj = models.FileField(upload_to=generate_storage_name)

@@ -198,117 +198,8 @@
 -1%5D%0A
-#    return %22%25s/%25s.%25s%22 %25 (strftime('%25Y-%25m-%25d', gmtime()),%0A#                         str(uuid4()), extension)%0A
     

Update to use shortuuid