Changes between Version 6 and Version 7 of AmazonSimpleStorageService


Ignore:
Timestamp:
08/03/2007 04:20:00 PM (8 years ago)
Author:
dobesv@…
Comment:

Fix field-specific bucket support

Legend:

Unmodified
Added
Removed
Modified
  • AmazonSimpleStorageService

    v6 v7  
    7575        super(S3FileField, self).contribute_to_class(cls, name)
    7676        models.CharField(maxlength=200, blank=self.blank, null=self.null).contribute_to_class(cls, "%s_key"%(self.name))
    77         models.CharField(maxlength=200, blank=self.blank, null=self.null, default=settings.DEFAULT_BUCKET).contribute_to_class(cls, "%s_bucket"%(self.name))
     77        models.CharField(maxlength=200, blank=self.blank, null=self.null, default=(self.bucket or settings.DEFAULT_BUCKET)).contribute_to_class(cls, "%s_bucket"%(self.name))
    7878        models.CharField(maxlength=200, blank=True, null=True, default="").contribute_to_class(cls, "%s_content_type"%(self.name))
    7979        models.IntegerField(blank=True, null=True).contribute_to_class(cls, "%s_size"%(self.name))
Back to Top