i have this image field in my model
foto = models.ImageField(upload_to="user/%Y/%m/%d",default='')
and in my settings:
MEDIA_ROOT = os.path.join(PROJECT_PATH, "media")
MEDIA_URL = "/media/"
and in my template:
<img class="profilfoto" src="{{MEDIA_URL|escapejs}}{{user.foto.name}}" />
other images with upload_to='.'
are being saved right into media folder, but user
folder isnot being created, why is this?
i ran syncdb and schemamigration, everything works fine but loading this image is giving 404 error as the path isnot there. what can be my mistake?