-
-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
Hello!
I'm using Mako to generate wikitext.
I want:
- If
song_name2in the parameters set: return the text; - If not: no treatment.
My code:
from mako.template import Template
temp = Template("""
% if song_name2:
|second=${song_name2}
% endif
"""))
temp.render(song_name2="Stasis") #return "|second=Stasis"
temp.render() #return NameError:Undefined——I want an empty string.Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels