core.utils
¶
Submodules¶
Package Contents¶
Functions¶
|
Returns an actual timestamp with UTC timezone setting. |
|
Return the seo-url to a skeleton instance or the module. |
|
|
|
Normalizes a datastore key (replacing _application with the current one) |
|
Attributes¶
- core.utils.utcNow()¶
Returns an actual timestamp with UTC timezone setting.
- Return type:
datetime.datetime
- core.utils.seoUrlToEntry(module, entry=None, skelType=None, language=None)¶
Return the seo-url to a skeleton instance or the module.
- Parameters:
module (str) – The module name.
entry (Optional[SkeletonInstance]) – A skeleton instance or None, to get the path to the module.
skelType (Optional[str]) – # FIXME: Not used
language (Optional[str]) – For which language. If None, the language of the current request is used.
- Returns:
The path (with a leading /).
- Return type:
str
- core.utils.seoUrlToFunction(module, function, render=None)¶
- Parameters:
module (str) –
function (str) –
render (Optional[str]) –
- Return type:
str
- core.utils.normalizeKey(key)¶
Normalizes a datastore key (replacing _application with the current one)
- Parameters:
key (Union[None, viur.core.db.KeyClass]) – Key to be normalized.
- Returns:
Normalized key in string representation.
- Return type:
Union[None, viur.core.db.KeyClass]
- core.utils.__UTILS_CONF_REPLACEMENT¶
- core.utils.__UTILS_NAME_REPLACEMENT¶
- core.utils.__getattr__(attr)¶