diff options
| author | Weitian LI <liweitianux@gmail.com> | 2014-06-24 17:50:49 +0800 | 
|---|---|---|
| committer | Weitian LI <liweitianux@gmail.com> | 2014-06-24 17:50:49 +0800 | 
| commit | af609a29bee3bc17800cf061c66b6eabcf18234f (patch) | |
| tree | 145334ad13578c29ab0041b81adfe894848f5eb6 | |
| parent | c5997ab8c15537a4744f80c7c9ce2b177d708939 (diff) | |
| download | django-skaschool-af609a29bee3bc17800cf061c66b6eabcf18234f.tar.bz2 | |
Fixed a problem with OverwriteStorage.
OverwriteStorage should be called as:
FileField(..., storage=OverwriteStorage(),...)
                                       ^^
| -rw-r--r-- | notice/models.py | 2 | ||||
| -rw-r--r-- | schedule/models.py | 2 | 
2 files changed, 2 insertions, 2 deletions
diff --git a/notice/models.py b/notice/models.py index 3f33e4d..d69ed9a 100644 --- a/notice/models.py +++ b/notice/models.py @@ -56,7 +56,7 @@ class NoticeAttachment(models.Model):      description = models.TextField(_("Description"), blank=True)      attachment = models.FileField(upload_to='notice/attachments',              verbose_name=_("Attachment"), -            storage=OverwriteStorage) +            storage=OverwriteStorage())      content_type = models.ForeignKey(ContentType)      object_id = models.PositiveIntegerField()      content_object = generic.GenericForeignKey("content_type", "object_id") diff --git a/schedule/models.py b/schedule/models.py index c0d004b..37ed3f4 100644 --- a/schedule/models.py +++ b/schedule/models.py @@ -45,7 +45,7 @@ class EventAttachment(models.Model):      description = models.TextField(_("Description"), blank=True)      attachment = models.FileField(upload_to='schedule/attachments',              verbose_name=_("Attachment"), -            storage=OverwriteStorage) +            storage=OverwriteStorage())      content_type = models.ForeignKey(ContentType)      object_id = models.PositiveIntegerField()      content_object = generic.GenericForeignKey("content_type", "object_id")  | 
