[text] 21 I generally put something like this in settings.py import socket try HOSTNAME socket.gethostnane except HOSTNAME localhost share edit flag answered Nov 510 at 415 XY Craig Trader M5k 04 022 049 2 Your solution does not work if you use Docker. It will show the container ID instead of the URL. Ozer S. Nov 1816 at 957 2 My solution was written before Docker existed. Sorry. Craig Trader Nov 22 16 at 803
in Cloud, Javascript, Programming