简体   繁体   中英

django image field - magic

i define upload_to = 'products', my media_root is /var/www/work.sanremo-dv.ru/media/

In debugger image.path equal /var/www/work.sanremo-dv.ru/media/imagename.ext - without upload_to dir. Phisical image stored by /var/www/work.sanremo-dv.ru/media/products/imagename.ext why?


在此处输入图片说明


在此处输入图片说明


在此处输入图片说明

也许您应将斜杠设置为upload_to

upload_to = 'products/'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM