HG changeset patch User serge in-square net Date 1237557038 -7200 Node

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# HG changeset patch
# User serge@in-square.net
# Date 1237557038 -7200
# Node ID 96b448157e97d650fcea19f8834377298a04b531
# Parent e68f1ace7738e0cd0f1343c175c6503e376b5b7a
Win32 fixes
diff -r e68f1ace7738 -r 96b448157e97 lib/models.py
--- a/lib/models.py Sun Mar 15 18:04:54 2009 +0200
+++ b/lib/models.py Fri Mar 20 15:50:38 2009 +0200
@@ -39,7 +39,7 @@
def _traverse(self):
for path, _, files in os.walk(self.root):
- relative = path[len(self.root):].lstrip('/')
+ relative = path[len(self.root):].lstrip(os.sep)
for f in files:
if not f.endswith('.cfg'):
self.add_page(op.join(relative, f))
@@ -69,7 +69,7 @@
self.env = site.env
self.path = path
self.dest = self.site.dest
- self.template = self.env.get_template(path, globals={'entry': self})
+ self.template = self.env.get_template(op.join(site.root, path), globals={'entry': self})
self.settings = Settings(self.site.settings)
if DATE_RE.search(self.path):
diff -r e68f1ace7738 -r 96b448157e97 lib/templatetags.py
--- a/lib/templatetags.py Sun Mar 15 18:04:54 2009 +0200
+++ b/lib/templatetags.py Fri Mar 20 15:50:38 2009 +0200
@@ -22,9 +22,16 @@
config = meta[0].nodes[0].data
args = [nodes.Name('entry', 'load'), nodes.Const(config)]
- output = [self.call_method('_update_entry', args=args),
+
+ # Quick fix, till Jinja2 get's fixed
+ # Should be:
+ # output = [self.call_method('_update_entry', args=args),
+ output = [nodes.CallBlock(self.call_method('_update_entry', args=args), [], [], ''),
nodes.Extends(nodes.Const('_base.html')),]
return output
- def _update_entry(self, entry, config):
+ def _update_entry(self, entry, config, caller):
entry.settings.read(config)
+
+ # TODO: Remove me after Jinja2 will be fixed
+ return ''