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 SERVER Copyright 2012-2019 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.is/.

Licensed under the GNU Lesser General Public License, version 3. See file LICENSE for more information.

Package Contents

Functions

setDefaultLanguage(lang)

Configures default language to lang.

setDefaultDomainLanguage(domain, lang)

mapModule(moduleObj: object, moduleName: str, targetResoveRender: dict)

Maps each function that’s exposed of moduleObj into the branch of prop:server.conf[“viur.mainResolver”]

buildApp(config, renderers, default=None, *args, **kwargs)

Creates the application-context for the current instance.

setup(modules, render=None, default='html')

Define whats going to be served by this instance.

app(environ, start_response)

forceSSL(f)

Decorator, which forces usage of an encrypted Channel for a given resource.

forcePost(f)

Decorator, which forces usage of an http post request.

exposed(f)

Decorator, which marks an function as exposed.

internalExposed(f)

Decorator, marks an function as internal exposed.

core.__version__
core.setDefaultLanguage(lang)

Configures default language to lang.

Parameters

lang (str) – Name of the language module to use by default.

core.setDefaultDomainLanguage(domain, lang)
core.mapModule(moduleObj: object, moduleName: str, targetResoveRender: dict)

Maps each function that’s exposed of moduleObj into the branch of prop:server.conf[“viur.mainResolver”] that’s referenced by prop:targetResoveRender. Will also walk prop:_viurMapSubmodules if set and map these sub-modules also.

core.buildApp(config, renderers, default=None, *args, **kwargs)

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
  • config (module | object) – Usually the module provided as modules directory within the application.

  • renders (module | dict) – Usually the module server.renders, or a dictionary renderName => renderClass.

  • default (str) – Name of the renderer, which will form the root of the application. This will be the renderer, which wont get a prefix, usually jinja2. (=> /user instead of /jinja2/user)

core.setup(modules, render=None, default='html')

Define whats going to be served by this instance.

Parameters
  • config (module | object) – Usually the module provided as modules directory within the application.

  • renders (module | dict) – Usually the module server.renders, or a dictionary renderName => renderClass.

  • default (str) – 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)

Decorator, which forces usage of an encrypted Channel for a given resource. Has no effect on development-servers.

core.forcePost(f)

Decorator, which forces usage of an http post request.

core.exposed(f)

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)

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().