I need to access the root url of my Heroku app. I have several apps for this project (e.g., staging, production) and I'd like to programmatically set this value in my settings file. What I want is:
URL_ROOT = 'http://silly-name-1234.herokuapp.com'
As suggested here, I have tried the following:
import socket
HOSTNAME = socket.gethostname()
URL_ROOT = HOSTNAME
But, this doesn't seem to work