Package elisa :: Package core :: Module frontend :: Class Frontend
[hide private]
[frames] | no frames]

Class Frontend

source code


A frontend can be connected to a elisa.core.backend.Backend in order to render its content. It does so by holding the root of a tree elisa.base_components.view.Views that render the elisa.base_components.controller.Controllers hold by the backend. The rendering is done in a context which is unique to a frontend.

A elisa.base_components.theme.Theme can be used in order to change the set of icons used by the views for their rendering.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self, mvc_config) source code
 
backend__set(self, backend) source code
 
backend__get(self) source code
 
theme__get(self) source code
 
theme__set(self, new_theme) source code
 
languages__get(self) source code
 
languages__set(self, languages) source code
unicode
translate_text(self, text)
Convert a translatable text to a text in the languages supported by the frontend.
source code
twisted.internet.defer.Deferred
clean(self)
Cleanup the frontend.
source code
 
get_view_path(self, model_path, content_type='frontend')
Retrieve the path of the view associated with given model
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]
 
__classinit__(cls, new_attrs)
Given a class and a new set of attributes (as passed in by __classinit__), create or modify properties based on functions with special names ending in __get, __set, and __del.
source code
Class Variables [hide private]
  theme_changed = <Signal theme_changed with 0 receivers>
  name = 'frontend'

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]
elisa.base_components.context.Context context
context in which the root view is rendered
list languages
the translation to use

elisa.core.config.Config

DOCME: ivar name; see below.
mvc_config
MVC associations config
elisa.base_components.theme.Theme theme
theme used by the frontend at rendering
elisa.base_components.view.View view
root view associated to the frontend
Properties [hide private]
  backend

Inherited from object: __class__

Method Details [hide private]

__init__(self, mvc_config)
(Constructor)

source code 
Overrides: log.Loggable.__init__

translate_text(self, text)

source code 
Convert a translatable text to a text in the languages supported by the frontend.
Parameters:
Returns: unicode

clean(self)

source code 
Cleanup the frontend. Once done, no rendering will be possible.
Returns: twisted.internet.defer.Deferred

get_view_path(self, model_path, content_type='frontend')

source code 
Retrieve the path of the view associated with given model
Parameters:
  • model_path (string) - path of the Model we're looking a View for
  • content_type (None or string) - content-type stored in the model
Raises:

Instance Variable Details [hide private]

languages

the translation to use
Get Method:
elisa.core.frontend.Frontend.languages__get(self)
Set Method:
elisa.core.frontend.Frontend.languages__set(self, languages)
Delete Method:
'frontend'

theme

theme used by the frontend at rendering
Get Method:
elisa.core.frontend.Frontend.theme__get(self)
Set Method:
elisa.core.frontend.Frontend.theme__set(self, new_theme)
Delete Method:
'frontend'

Property Details [hide private]

backend

Get Method:
elisa.core.frontend.Frontend.backend__get(self)
Set Method:
elisa.core.frontend.Frontend.backend__set(self, backend)
Delete Method:
'frontend'