0

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.

  • Your question is unclear. It's fine to host your static files on Heroku - it's even fully described in the Heroku docs for Django, including how to configure Whitenoise to serve them. It's only user-uploaded media files that you mustn't safe on the Heroku filesystem. – Daniel Roseman Jun 07 '19 at 06:31
  • @DanielRoseman I already have my static files in AWS and I want to keep them there, but I want only the static files related to TinyMCE to be Heroku so that I stop getting errors that occur on about those files being on a different domain (Same-origin policy). – Jonel Mercado Jun 08 '19 at 00:26
  • @DanielRoseman Do you know if it's possible to use some static files from AWS and others from Heroku using whitenoise? That would solve my problem. – Jonel Mercado Jun 08 '19 at 23:19

1 Answers1

0

One of the easiest way is to host your file on some server if you have otherwise there are many free options available then use that file as CDN in your template just like other JS file links.

ans2human
  • 2,300
  • 1
  • 14
  • 29