From 97a2710bd71aa896f0c8e7f6c3b20bbed26e8f4d Mon Sep 17 00:00:00 2001 From: portnov Date: Thu, 5 Jun 2008 23:34:30 +0600 Subject: [PATCH] add Node module. --- modules.py | 2 -- modules/node.py | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 modules/node.py diff --git a/modules.py b/modules.py index 152044c..495a4c9 100644 --- a/modules.py +++ b/modules.py @@ -50,6 +50,4 @@ for dirpath, dirs, files in os.walk(MODS_DIR): if file[-3:] == ".py": name = os.path.join(dirpath,file[:-3]) module = __import__(name) -# for n in exports: -# setattr(module,n,globals()[n]) modules[name] = module diff --git a/modules/node.py b/modules/node.py new file mode 100644 index 0000000..ebea2b0 --- /dev/null +++ b/modules/node.py @@ -0,0 +1,19 @@ + +def init(): + + class Node(object): + author="" + title = "" + content = "" + fields = {} + + @themeable + def node(nd): + return """
+

%s

+
+ %s +
+
""" % (nd.title, nd.content) + + export_as(Node,"Node") -- 1.7.2.3