Re: Migrations and FileField storage

2015-08-25 Thread Steve Capell
Hi Nico, I had the same problem when I was using this storage object: photoStorage = FileSystemStorage(location=os.path.join(settings.MEDIA_ROOT, 'photos/original'), base_url='/photos/original') class Photo(models.Model): image = models.ImageField(storage=photoStorage) The "location" argu

Re: Migrations and FileField storage

2014-11-14 Thread Markus Holtermann
Hey Nico, if you want to dynamically determin the upload / storage path you should use the "upload_to" parameter with a callable: https://docs.djangoproject.com/en/1.7/ref/models/fields/#django.db.models.FileField.upload_to inside the callable you can safely access the settings without influe

Migrations and FileField storage

2014-11-12 Thread Nico Benitez
I have a question about storage objects in a migration enabled project. I have a project that uses a file system storage backend for storing certain model FileFields, but the location is dependent on the deployment and stored in the settings module. For example, for testing locally I have the stor