Browse Source

Template is an argument of the render method

pull/103/head
Oliverpool 9 years ago
parent
commit
fd7216d5cb
  1. 4
      patacrep/songs/chordpro/__init__.py

4
patacrep/songs/chordpro/__init__.py

@ -28,7 +28,7 @@ class ChordproSong(Song):
'song': song, 'song': song,
} }
def render(self, output, output_format): def render(self, output, output_format, template="song"):
context = { context = {
'language': self.languages[0], 'language': self.languages[0],
"path": files.relpath(self.fullpath, os.path.dirname(output)), "path": files.relpath(self.fullpath, os.path.dirname(output)),
@ -50,7 +50,7 @@ class ChordproSong(Song):
return self._render_ast( return self._render_ast(
context, context,
self.cached['song'].content, self.cached['song'].content,
template="song", template=template,
) )
@contextfunction @contextfunction

Loading…
Cancel
Save