How do I debug this when log tells me absolutely nothing?
Works locally, then 500 error on Heroku deployment
Looks like trying to fetch index.html but again how do I tell this from log?
All that seems to be there is
“GET / HTTP/1.1”
causing the 500.
However I have urls.py:
urlpatterns = [
path(“”, views.index, name=“index”),
and in views.py:
def index(request):
template = loader.get_template(“index.html”)
…
and it is not complaining about not finding template or static files. If it can’t find the
index.html template why is it not putting this in the log
Very frustrating environment to debug
There is a warning about no directory at app/static, but I don’t think related?
heroku logs --remote staging
(I have staging and production apps):
2023-08-05T23:49:43.855517+00:00 heroku[web.1]: State changed from starting to up
2023-08-05T23:49:44.056551+00:00 app[web.1]: /app/.heroku/python/lib/python3.11/site-packages/django/core/handlers/base.py:61: UserWarning: No directory at: /app/static/
2023-08-05T23:49:44.056567+00:00 app[web.1]: mw_instance = middleware(adapted_handler)
2023-08-05T23:49:44.056581+00:00 app[web.1]: /app/.heroku/python/lib/python3.11/site-packages/django/core/handlers/base.py:61: UserWarning: No directory at: /app/static/
2023-08-05T23:49:44.056581+00:00 app[web.1]: mw_instance = middleware(adapted_handler)
2023-08-05T23:49:44.056567+00:00 app[web.1]: mw_instance = middleware(adapted_handler)
2023-08-05T23:49:44.056581+00:00 app[web.1]: /app/.heroku/python/lib/python3.11/site-packages/django/core/handlers/base.py:61: UserWarning: No directory at: /app/static/
2023-08-05T23:49:44.056581+00:00 app[web.1]: mw_instance = middleware(adapted_handler)
2023-08-05T23:50:14.051358+00:00 app[web.1]: 10.1.63.232 - - [05/Aug/2023:23:50:14 +0000] “GET / HTTP/1.1” 500 145 “https://dashboard.heroku.c
om/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/116.0”
2023-08-05T23:50:14.052236+00:00 heroku[router]: at=info method=GET path=“/” host=staging-aisling-music-f00e6bcaad80.herokuapp.com request_id=6667d224-860a-411d-86f5-1fbdcc5e28c1 fwd=“91.102.82.198” dyno=web.1 connect=0ms service=47ms status=500 bytes=459 protocol=https