From 719d6cc6a6f6f376151607b5b7fb4596986b974e 2013-01-08 06:46:45 From: Matthias BUSSONNIER Date: 2013-01-08 06:46:45 Subject: [PATCH] add any-cell block --- diff --git a/templates/basic.tpl b/templates/basic.tpl index 294aed2..613c756 100644 --- a/templates/basic.tpl +++ b/templates/basic.tpl @@ -2,22 +2,24 @@ {%- endblock header -%} {%- block body -%} {%- for cell in cells -%} - {%- if cell.type in ['code'] -%} - {%- block codecell scoped-%} - {%- endblock codecell-%} - {%- elif cell.type in ['markdown'] -%} - {%- block markdowncell scoped-%} - {%- endblock markdowncell -%} - {%- elif cell.type in ['heading'] -%} - {%- block headingcell scoped-%} - {%- endblock headingcell -%} - {%- elif cell.type in ['raw'] -%} - {%- block rawcell scoped-%} - {%- endblock rawcell -%} - {%- else -%} - {%- block unknowncell scoped-%} - {%- endblock unknowncell -%} - {%- endif -%} + {%- block any_cell scoped -%} + {%- if cell.type in ['code'] -%} + {%- block codecell scoped-%} + {%- endblock codecell-%} + {%- elif cell.type in ['markdown'] -%} + {%- block markdowncell scoped-%} + {%- endblock markdowncell -%} + {%- elif cell.type in ['heading'] -%} + {%- block headingcell scoped-%} + {%- endblock headingcell -%} + {%- elif cell.type in ['raw'] -%} + {%- block rawcell scoped-%} + {%- endblock rawcell -%} + {%- else -%} + {%- block unknowncell scoped-%} + {%- endblock unknowncell -%} + {%- endif -%} + {%- endblock any_cell -%} {%- endfor -%} {%- endblock body -%} diff --git a/templates/python-armor.tpl b/templates/python-armor.tpl index 2015cf9..018af6f 100644 --- a/templates/python-armor.tpl +++ b/templates/python-armor.tpl @@ -1,10 +1,9 @@ {%- extends 'python.tpl' -%} -{% block codecell %} +{% block any_cell %} ============================== -=======start codecell========= +=======start {{cell.type}}========= {{ super() }} -======= end codecell ========= -============================== -{% endblock codecell %} +======= end {{cell.type}} ========= +=============================={% endblock any_cell %}