changing get_host call to use httprequest object

standalone get_host function is no longer present in django 1.5
Merge pull request #1666 from dimagi/get_host

changing get_host call to use httprequest object