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
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
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
3 matches
Mail list logo