From af609a29bee3bc17800cf061c66b6eabcf18234f Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Tue, 24 Jun 2014 17:50:49 +0800 Subject: Fixed a problem with OverwriteStorage. OverwriteStorage should be called as: FileField(..., storage=OverwriteStorage(),...) ^^ --- notice/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notice') 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") -- cgit v1.2.2