﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14911	Custom Storage System not working properly	jtheoof	nobody	"As described in django [http://docs.djangoproject.com/en/dev/topics/files/ doc], it should be possible to override the default storage system.

{{{
from django.db import models
from django.core.files.storage import FileSystemStorage

fs = FileSystemStorage(location='/media/photos')

class Car(models.Model):
    ...
    photo = models.ImageField(storage=fs)
}}}

Also, by default, the `DefaultStorage` is the `FileSystemStorage` in `django.core.files.storage`

But specifying storage at model field level is rising an exception see this code:

{{{
import datetime

from django.core.files.storage import FileSystemStorage
from django.db import models

class ModelTest(models.Model):
    image = models.ImageField(upload_to='test', storage=FileSystemStorage)
    date_created = models.DateTimeField(default=datetime.datetime.now)
}}}

I'm getting the following exception at view level:

`unbound method get_valid_name() must be called with FileSystemStorage instance as first argument (got unicode instance instead)`

when I try to upload a file in the admin interface.

If I remove the `storage` parameter, it works fine.
"		closed	File uploads/storage	1.2		invalid	storage ImageField Custom		Unreviewed	0	0	0	0	0	0
