code: def get_site_url(site_url=None, request=None):
      
      site_url = site_url or settings.get('SITE_URL')
      if site_url:
          return site_url
      elif request:
          return '{}://{}'.format(request.scheme, request.get_host())
      else:
          raise Exception('Either pass `site_url`, '
                          'or set `SITE_URL` in settings, '
                          'or pass `request` object.')
docs: Construct the site url.
  
      Orders to decide site url:
          1. valid `site_url` parameter
          2. valid `SITE_URL` in settings
          3. construct from `request` object