Home | Trees | Indices | Help |
|
---|
|
object --+ | base.Widget --+ | SyntaxHighlighter
A source code syntax-highlighter widget.
This widget includes the syntax highlighter js and css into your rendered page to syntax-hightlight textareas named 'code'. The supported languages can be listed at the 'languages' __init__ parameter.
Instance Methods | |||
|
|||
Inherited from Inherited from |
Class Variables | |
available_langs = set(['CSharp', 'Css', 'Delphi', 'Java', 'JSc
|
|
css = [CSSLink(static, "sh/SyntaxHighlighter.css")]
|
|
Inherited from |
Properties | |
Inherited from |
Method Details |
Widget initialization. All initialization has to take place in this method. It's not thread-safe to mutate widget's attributes outside this method or anytime after widget's first display. *Must* call super(MyWidget, self).__init__(*args, **kw) cooperatively, unless, of course, you know what you're doing. Preferably this should be done before any actual work is done in the method. Parameters: name: The widget's name. In input widgets, this will also be the name of the variable that the form will send to the controller. This is the only param that is safe to pass as a positional argument to __init__. template: The template that the widget should use to display itself. Currently only Genshi and Kid templates are supported. You can both initialize with a template string or with the path to a file-base template: 'myapp.templates.widget_tmpl' engine_name: The engine to be used for rendering the template, if not specified in the template already. default: Default value to display when no value is passed at display time. **params: Keyword arguments specific to your widget or to any of its bases. If listed at class attribute 'params' the will be bound automatically to the widget instance. Note: Do not confuse these parameters with parameters listed at "params". Some widgets accept parameters at the constructor which are not listed params, these parameter won't be passed to the template, be automatically called, etc.
|
Class Variable Details |
available_langs
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jul 19 17:17:56 2019 | http://epydoc.sourceforge.net |