Trees Indices Help
Trac
Package trac :: Package web :: Module chrome :: Class Chrome

Class Chrome

source code

 object --+ 
 | 
core.Component --+
 |
 Chrome

Web site chrome assembly manager.

Chrome is everything that is not actual page content.

Nested Classes

Inherited from core.Component : __metaclass__

Instance Methods
get_system_info(self) source code
environment_created(self)
Create the environment templates directory. source code
environment_needs_upgrade(self, db) source code
upgrade_environment(self, db) source code
match_request(self, req) source code
process_request(self, req) source code
get_htdocs_dirs(self) source code
get_templates_dirs(self) source code
get_wiki_syntax(self) source code
get_link_resolvers(self) source code
get_all_templates_dirs(self)
Return a list of the names of all known templates directories. source code
prepare_request(self, req, handler=None)
Prepare the basic chrome data for the request. source code
get_icon_data(self, req) source code
get_logo_data(self, href, abs_href=None) source code
populate_hdf(self, req)
Add chrome-related data to the HDF (deprecated). source code
populate_data(self, req, data) source code
load_template(self, filename, method=None)
Retrieve a Template and optionally preset the template data. source code
render_template(self, req, filename, data, content_type=None, fragment=False)
Render the filename using the data for the context. source code
cc_list(self, cc_field)
Split a CC: value in a list of addresses. source code
format_emails(self, context, value, sep=', ')
Normalize a list of e-mails and obfuscate them if needed. source code
authorinfo(self, req, author, email_map=None) source code
get_email_map(self)
Get the email addresses of all known users. source code
authorinfo_short(self, author) source code
format_author(self, req, author) source code
add_textarea_grips(self, req)
Make <textarea class="trac-resizable"> fields resizable if enabled by configuration. source code
add_wiki_toolbars(self, req)
Add wiki toolbars to <textarea class="wikitext"> fields. source code
add_auto_preview(self, req)
Setup auto-preview for <textarea> fields. source code
__init__(self, compmgr, init=None, cls=<class 'trac.web.chrome.Chrome'>)
x.__init__(...) initializes x; see help(type(x)) for signature source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component : __new__ , implements

Class Variables
required = True
shared_templates_dir = <PathOption [inherit] "templates_dir">
auto_reload = <BoolOption [trac] "auto_reload">
genshi_cache_size = <IntOption [trac] "genshi_cache_size">
htdocs_location = <Option [trac] "htdocs_location">
metanav_order = <ListOption [trac] "metanav">
mainnav_order = <ListOption [trac] "mainnav">
logo_link = <Option [header_logo] "link">
logo_src = <Option [header_logo] "src">
logo_alt = <Option [header_logo] "alt">
logo_width = <IntOption [header_logo] "width">
logo_height = <IntOption [header_logo] "height">
show_email_addresses = <BoolOption [trac] "show_email_addresses">
never_obfuscate_mailto = <BoolOption [trac] "never_obfuscate_m...
show_ip_addresses = <BoolOption [trac] "show_ip_addresses">
resizable_textareas = <BoolOption [trac] "resizable_textareas">
auto_preview_timeout = <FloatOption [trac] "auto_preview_timeo...
templates = None
hash(x)
Properties
navigation_contributors
List of components that implement INavigationContributor
template_providers
List of components that implement ITemplateProvider
stream_filters
List of components that implement ITemplateStreamFilter

Inherited from object: __class__

Method Details

prepare_request(self, req, handler=None)

source code
Prepare the basic chrome data for the request.
@param req: the request object
@param handler: the `IRequestHandler` instance that is processing the
 request

load_template(self, filename, method=None)

source code

Retrieve a Template and optionally preset the template data.

Also, if the optional method argument is set to 'text', a NewTextTemplate instance will be created instead of a MarkupTemplate.

render_template(self, req, filename, data, content_type=None, fragment=False)

source code

Render the filename using the data for the context.

The content_type argument is used to choose the kind of template used (NewTextTemplate if 'text/plain', MarkupTemplate otherwise), and tweak the rendering process (use of XHTML Strict doctype if 'text/html' is given).

When fragment is specified, the (filtered) Genshi stream is returned.

format_emails(self, context, value, sep=', ')

source code
Normalize a list of e-mails and obfuscate them if needed.
Parameters:
  • context - the context in which the check for obfuscation should be done
  • value - a string containing a comma-separated list of e-mails
  • sep - the separator to use when rendering the list again

__init__(self, compmgr, init=None, cls=<class 'trac.web.chrome.Chrome'>)
(Constructor)

source code
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

Class Variable Details

never_obfuscate_mailto

Value:
<BoolOption [trac] "never_obfuscate_mailto">

auto_preview_timeout

Value:
<FloatOption [trac] "auto_preview_timeout">

Property Details

navigation_contributors

List of components that implement INavigationContributor
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.

template_providers

List of components that implement ITemplateProvider
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.

stream_filters

List of components that implement ITemplateStreamFilter
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.

Trees Indices Help
Trac

AltStyle によって変換されたページ (->オリジナル) /