class documentation

class TemplateNamespace(Namespace): (source)

View In Hierarchy

A :class:`.Namespace` specific to a :class:`.Template` instance.

Method __getattr__ Undocumented
Method __init__ Undocumented
Instance Variable callables Undocumented
Instance Variable context The :class:`.Context` object for this :class:`.Namespace`.
Instance Variable inherits Undocumented
Instance Variable name Undocumented
Instance Variable template The :class:`.Template` object referenced by this :class:`.Namespace`, if any.
Property filename The path of the filesystem file used for this :class:`.Namespace`'s module or template.
Property module The Python module referenced by this :class:`.Namespace`.
Property uri The URI for this :class:`.Namespace`'s template.
Method _get_star Undocumented
Instance Variable _templateuri Undocumented

Inherited from Namespace:

Method get_cached Return a value from the :class:`.Cache` referenced by this :class:`.Namespace` object's :class:`.Template`.
Method get_namespace Return a :class:`.Namespace` corresponding to the given ``uri``.
Method get_template Return a :class:`.Template` from the given ``uri``.
Method include_file Include a file at the given ``uri``.
Property attr Access module level attributes by name.
Property cache Return the :class:`.Cache` object referenced by this :class:`.Namespace` object's :class:`.Template`.
Method _populate Undocumented
def __getattr__(self, key): (source)

Undocumented

def __init__(self, name, context, template=None, templateuri=None, callables=None, inherits=None, populate_self=True, calling_uri=None): (source)

Undocumented

callables = (source)

Undocumented

The :class:`.Context` object for this :class:`.Namespace`. Namespaces are often created with copies of contexts that contain slightly different data, particularly in inheritance scenarios. Using the :class:`.Context` off of a :class:`.Namespace` one can traverse an entire chain of templates that inherit from one-another.

inherits = (source)

Undocumented

template = (source)

The :class:`.Template` object referenced by this :class:`.Namespace`, if any.

The path of the filesystem file used for this :class:`.Namespace`'s module or template.

The Python module referenced by this :class:`.Namespace`. If the namespace references a :class:`.Template`, then this module is the equivalent of ``template.module``, i.e. the generated module for the template.

The URI for this :class:`.Namespace`'s template. I.e. whatever was sent to :meth:`.TemplateLookup.get_template()`. This is the equivalent of :attr:`.Template.uri`.

def _get_star(self): (source)

Undocumented

_templateuri = (source)

Undocumented