generate host properly in form authorize redirect uri, support
for older Django <1.5 absolute_http_url_re location was changed
import assuming Django >=1.5 if import error try old location.