Quantcast
Channel: User Chase Seibert - Stack Overflow
Viewing all articles
Browse latest Browse all 43

Answer by Chase Seibert for os.path python module not working in heroku

$
0
0

Something like the following worked for me on similar Heroku/MEDIA_ROOT issue.

TEMPLATE_LOADERS = ('django.template.loaders.filesystem.Loader','django.template.loaders.app_directories.Loader',)BASE_PATH = os.path.dirname(__file__)TEMPLATE_DIRS = (    os.path.join(BASE_PATH, "project/templates/templates"), )

However, if you stuck to the default directory structure for Django, you would not have to set TEMPLATE_DIRS at all. Ie, home.html should be at project/project/templates. Typically css/javascript is outside that directory. I can verify that this works on Heroku.


Viewing all articles
Browse latest Browse all 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>