def public_url(app, user_or_service=None):
 if user_or_service:
  if app.subdomain_host:
   host = user_or_service.host
  else:
   host = public_host(app)
  return (host + user_or_service.server.base_url)
 else:
  return (public_host(app) + app.proxy.public_server.base_url)

def public_url ( app , user_or_service = None ) : if user_or_service : if app . subdomain_host : host = user_or_service . host else : host = public_host ( app ) return ( host + user_or_service . server . base_url ) else : return ( public_host ( app ) + app . proxy . public_server . base_url )
return the full .