add Node module.

portnov [2008-06-05 17:34:30]
add Node module.
Filename
modules.py
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 """<div class='node'>
+    <h2>%s</h2>
+    <div class='content'>
+    %s
+    </div>
+    </div>""" % (nd.title, nd.content)
+
+  export_as(Node,"Node")
ViewGit