Permalink
Browse files

General docs cleanup.

  • Loading branch information...
ralphbean committed Nov 6, 2012
1 parent 55001c7 commit 144d5cfbb63e85b37bb9786cdc6bd71f4a1f0e99
Showing with 6 additions and 3 deletions.
  1. +3 −2 docs/pyramid.rst
  2. +3 −1 tw2/core/js.py
@@ -113,9 +113,10 @@ contents::
</html>
Fourthly, modify the class responsible for producing your resource tree,
the ``MyApp`` class in ``myapp/models.py``. At the top of the file add::
the ``MyApp`` class in ``myapp/models.py``.
Add the following hook into the ``def __getitem__(self, key):`` method of the ``MyApp`` class just above the ``session= DBSession()`` line::
Add the following hook into the ``def __getitem__(self, key):`` method of
the ``MyApp`` class just above the ``session= DBSession()`` line::
if key == 'movie':
import myapp.widgets
@@ -97,6 +97,8 @@ def unescape(match):
class js_symbol(object):
""" An unquoted js symbol like ``document`` or ``window`` """
def __init__(self, name=None, src=None):
if name == None and src == None:
raise ValueError("js_symbol must be given name or src")
@@ -162,7 +164,7 @@ def __str__(self):
class js_function(object):
"""A JS function that can be "called" from python and and added to
"""A JS function that can be "called" from python and added to
a widget by widget.add_call() so it get's called every time the widget
is rendered.

0 comments on commit 144d5cf

Please sign in to comment.