Home | Trees | Indices | Help |
|
---|
|
Basic OS interface/utility functions that depend on our configuration.
(everything that doesn't need getConfig is somewhere in gavo.utils)
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
creates a directory with group ownership [general]group. There's much that can to wrong; we try to raise useful error messages. |
returns the server's base URL for the http protocol. This is just serverURL from the configuration, unless serverURL is https; in that case, we replace https with http. serverPort is ignored here under the assumption that there's a reverse proxy. If that bites you, we could introduce an alternativeServerURL config item.
|
return the server's base URL for the https protocol. If serverURL already is https, that's what's returned. If not, the URL is parsed, any port specification is removed (i.e., we only support https on port 443), the protocol is changed to https, and the result is returned.
|
tries to make an https URL from an http one and vice versa. This function will raise a ValueError if url doesn't start with either HTTPBase or HTTPSBase. Otherwise, it will replace one by the other. |
returns the server URL pertinent for the current request. This looks upstack for a renderer object having a HANDLING_HTTPS attribute. If it finds one, it will return HTTPBase() or HTTPSBase() as appropriate. If not, it will return [web]serverurl |
returns a rooted local part for a server-internal URL. uri itself needs to be server-absolute; a leading slash is recommended for clarity but not mandatory.
|
returns a fully qualified URL for a rooted local part. This will reflect the http/https access mode unless you pass canonical=True, in which case [web]serverURL will be used unconditionally.
|
returns the name of a binary it thinks is appropriate for the platform. To do this, it asks config for the platform name, sees if there's a binary <bin>-<platname> if platform is nonempty. If it exists, it returns that name, in all other cases, it returns baseName unchanged. |
returns a path for a "dist resource", i.e., a file distributed with DaCHS. name is the file relative to resources. This is essentially pkg_resources.resource_filename with a dash of built-in configuration. |
returns an open file for a "dist resource", i.e., a file distributed with DaCHS. see getPathForDistFile |
returns (as a string) the DaCHS version running. The information is obtained from setuptools. |
returns a mail with headers and content properly formatted as a bytestring and MIME. mailText must be a unicode instance or pure ASCII |
tries to reload the rdId on a running service This only works if there's [web]adminpasswd and[web]serverURL set, and both match what the actual server uses. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |