简体   繁体   中英

use static media files from server locally in django

Is it possible to use the static media files from a development server locally?

Instead of linking locally to localhost/static/media/some_pic.jpg I would like to link to use our development server dev.site.com/static/media/some_pic.jpg when I use relative urls in the templates.

您可以将设置中的MEDIA_URL更改为“ http://dev.site.com/static/media/ ”。

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