From 4cf9a1bdae686e5d1eae76221a089e1ce1641c50 Mon Sep 17 00:00:00 2001 From: portnov Date: Thu, 5 Jun 2008 21:59:12 +0600 Subject: [PATCH] Support for generating blocks. --- modules/blocks.py | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/modules/blocks.py b/modules/blocks.py index e2dc5ac..78d7033 100644 --- a/modules/blocks.py +++ b/modules/blocks.py @@ -1,4 +1,23 @@ def init(): + print "Blocks module loaded." + block = generates('block') + export_as(block,'block') + + @themeable + def block(blk): + return """
+

%s

+
+ %s +
+
""" % (blk.title,blk.content) + + class Block(Generated): + name = "Block" + title = "" + content = "" + def show(self): + return theme('block', self) -- 1.7.2.3