Latest Version: 0.9.6.2

util

Paste Template and Pylons utility functions

PylonsTemplate is a Paste Template sub-class that configures the source directory and default plug-ins for a new Pylons project. The minimal template provides a more minimal template with less additional directories and layout.


Functions

f _(*args, **kargs) ...

The _ function has moved to pylons.i18n, please update your import statements to reflect the move

Mark a string for translation. Returns the localized unicode string of

value.

Mark a string to be localized as follows:

1
_('This should be in lots of languages')

f class_name_from_module_name(module_name) ...

Takes a module name and returns the name of the class it defines.

If the module name contains dashes, they are replaced with underscores.

Example:

>>> class_name_from_module_name('with-dashes')
'WithDashes'
>>> class_name_from_module_name('with_underscores')
'WithUnderscores'
>>> class_name_from_module_name('oneword')
'Oneword'

f get_lang(*args, **kargs) ...

The get_lang function has moved to pylons.i18n, please update your import statements to reflect the move

Return the current i18n language used

f log(*args, **kwargs) ...

Deprecated: Use the logging module instead.

Log a message to the output log.

f set_lang(*args, **kargs) ...

The set_lang function has moved to pylons.i18n, please update your import statements to reflect the move

Set the i18n language used

Classes

C AttribSafeContextObj(...) ...

The 'c' object, with lax attribute access (returns '' when the attribute does not exist)

This class contains 1 member.

C ContextObj(...) ...

The 'c' object, with strict attribute access (raises an Exception when the attribute does not exist)

This class contains 1 member.

C MinimalPylonsTemplate(...) ...

This class contains 9 members.

C PylonsTemplate(...) ...

This class contains 9 members.

See the source for more information.

Top