简体   繁体   中英

How to reference a static file in Django that isn't inside my static file directory?

I want to use a javascript file that isn't in my static URL nor in any file that would be collected when running collect static. How would a point to this file in a way that I don't have to use {% load static %}

It is basically so I can have only my DjangoTiny-MCE files in my Heroku server without collecting static instead of storing them in AWS because that has proven troublesome.

最简单的方法之一是在某些服务器上托管您的文件,否则有许多可用的免费选项,然后在模板中将该文件用作CDN ,就像其他JS文件链接一样。

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