core
¶
iii
iii
iii
vvv iii uu uu rrrrrrrr
vvvv iii uu uu rr rr
v vvvv iii uu uu rr rr vv vvvv iii uu uu rr rrrrr
- vvvv vvvv iii uu uu rr rrr
- vvv vvvv iii uu uu rr rrr
- vvvvvv iii uu uu rr rrr
vvvv iii uuuuuu rr rrr
I N F O R M A T I O N S Y S T E M
ViUR core Copyright 2012-2021 by Mausbrand Informationssysteme GmbH
ViUR is a free software development framework for the Google App Engine™. More about ViUR can be found at https://www.viur.dev.
Licensed under the GNU Lesser General Public License, version 3. See file LICENSE for more information.
Subpackages¶
core.bones
core.bones.bone
core.bones.booleanBone
core.bones.captchaBone
core.bones.colorBone
core.bones.credentialBone
core.bones.dateBone
core.bones.emailBone
core.bones.fileBone
core.bones.keyBone
core.bones.numericBone
core.bones.passwordBone
core.bones.randomSliceBone
core.bones.rawBone
core.bones.recordBone
core.bones.relationalBone
core.bones.selectBone
core.bones.selectCountryBone
core.bones.spatialBone
core.bones.stringBone
core.bones.textBone
core.bones.treeLeafBone
core.bones.treeNodeBone
core.bones.userBone
core.languages
core.modules
core.prototypes
core.render
Submodules¶
Package Contents¶
Functions¶
|
Sets the default language used by ViUR to lang. |
|
If conf["viur.languageMethod"] is set to "domain", this function allows setting the map of which domain |
|
Maps each function that's exposed of moduleObj into the branch of prop:server.conf["viur.mainResolver"] |
|
Creates the application-context for the current instance. |
|
Define whats going to be served by this instance. |
|
|
|
Decorator, which forces usage of an encrypted Channel for a given resource. |
|
Decorator, which forces usage of an http post request. |
|
Decorator, which marks an function as exposed. |
|
Decorator, marks an function as internal exposed. |
Attributes¶
- core.__version__ = [3, 0, 0]¶
- core.setDefaultLanguage(lang: str)¶
Sets the default language used by ViUR to lang.
- Parameters
lang – Name of the language module to use by default.
- core.setDefaultDomainLanguage(domain: str, lang: str)¶
If conf[“viur.languageMethod”] is set to “domain”, this function allows setting the map of which domain should use which language. :param domain: The domain for which the language should be set :param lang: The language to use (in ISO2 format, e.g. “DE”)
- core.mapModule(moduleObj: object, moduleName: str, targetResolverRender: dict)¶
Maps each function that’s exposed of moduleObj into the branch of prop:server.conf[“viur.mainResolver”] that’s referenced by prop:targetResolverRender. Will also walk prop:_viurMapSubmodules if set and map these sub-modules also.
- core.buildApp(modules: Union[types.ModuleType, object], renderers: Union[types.ModuleType, Dict], default: str = None)¶
Creates the application-context for the current instance.
This function converts the classes found in the modules-module, and the given renders into the object found at
conf["viur.mainApp"]
.Every class found in modules becomes
instanced
get the corresponding renderer attached
will be attached to
conf["viur.mainApp"]
- Parameters
modules – Usually the module provided as modules directory within the application.
renderers – Usually the module server.renders, or a dictionary renderName => renderClass.
default – Name of the renderer, which will form the root of the application. This will be the renderer, which wont get a prefix, usually html. (=> /user instead of /html/user)
- core.setup(modules: Union[object, types.ModuleType], render: Union[types.ModuleType, Dict] = None, default: str = 'html')¶
Define whats going to be served by this instance.
- Parameters
modules – Usually the module provided as modules directory within the application.
render – Usually the module server.renders, or a dictionary renderName => renderClass.
default – Name of the renderer, which will form the root of the application. This will be the renderer, which wont get a prefix, usually html. (=> /user instead of /html/user)
- core.app(environ, start_response)¶
- core.forceSSL(f: Callable) Callable ¶
Decorator, which forces usage of an encrypted Channel for a given resource. Has no effect on development-servers.
- core.forcePost(f: Callable) Callable ¶
Decorator, which forces usage of an http post request.
- core.exposed(f: Callable) Callable ¶
Decorator, which marks an function as exposed.
Only exposed functions are callable by http-requests. Can optionally receive a dict of language->translated name to make that function available under different names
- core.internalExposed(f: Callable) Callable ¶
Decorator, marks an function as internal exposed.
Internal exposed functions are not callable by external http-requests, but can be called by templates using
execRequest()
.