change `str` to `basestring` in case someone has `SITE_URL = u'http://example.com'`