You don't need to hardcode host in here. You have access to that data in the view through the Site model. I will ask @gklopper how to do this properly.