From 55a99588f327f11ab0ab4bd603b162842f4bf483 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 20 Sep 2005 04:50:21 +0000 Subject: [PATCH] --- doc/build/components/formatting.myt | 73 ++++++++++++++++++++++------- doc/build/content/datamapping.myt | 5 +- 2 files changed, 58 insertions(+), 20 deletions(-) diff --git a/doc/build/components/formatting.myt b/doc/build/components/formatting.myt index 437dd17ebc..9fe39286b7 100644 --- a/doc/build/components/formatting.myt +++ b/doc/build/components/formatting.myt @@ -296,6 +296,7 @@ <%args> title = None syntaxtype = 'python' + html_escape = False <%init> @@ -319,7 +320,7 @@ return g.rstrip() - content = highlight.highlight(fix_indent(m.content()), syntaxtype = syntaxtype) + content = highlight.highlight(fix_indent(m.content()), html_escape = html_escape, syntaxtype = syntaxtype)
@@ -368,20 +369,56 @@ __FORMAT:LINK{<%path%><% extra and "|" + extra or "" %><% text and "@text=" + te % -#<&| /components/uniqueblock.mhtml, blockname=>'popboxscript', uniquename=>$name &> -# -# +<%method popboxlink trim="both"> + <%args> + name=None + show='show' + hide='hide' + + <%init> + if name is None: + name = m.attributes.setdefault('popbox_name', 0) + m.attributes['popbox_name'] += 1 + name = "popbox_" + repr(name) + +javascript:togglePopbox('<% name %>', show, hide) + +<%method popbox> +<%args> + name = None + +<%init> + if name is None: + name = 'popbox_' + repr(m.attributes['popbox_name']) + +<&| SELF:uniqueblock, blockname='popboxscript', uniquename=name &> + + +
<% m.content() %>
+ + +<%method codepopper> + <%args> + link + + link + <&|SELF:popbox&><% m.content() %> + \ No newline at end of file diff --git a/doc/build/content/datamapping.myt b/doc/build/content/datamapping.myt index 723dc8ce73..a5644f32b0 100644 --- a/doc/build/content/datamapping.myt +++ b/doc/build/content/datamapping.myt @@ -26,8 +26,9 @@ m = mapper(User, users) # select - user = m.select(users.c.user_name == 'fred')[0] - + <&|formatting.myt:codepopper, link="user = m.select(users.c.user_name == 'fred')[0]" &> + sql sql sql sql + # modify user.user_name == 'fred jones' -- 2.47.2