Show More
@@ -10,46 +10,46 b' Subtemplates can Override Blocks to define their custom reresentation.' | |||
|
10 | 10 | If one of the block you do overrite is nt a leave block, consider |
|
11 | 11 | calling super. |
|
12 | 12 | |
|
13 | {% block nonLeaveBlock %} | |
|
13 | {%- block nonLeaveBlock -%} | |
|
14 | 14 | #add stuff at beginning |
|
15 | 15 | {{ super() }} |
|
16 | 16 | #add stuff at end |
|
17 | {% endblock nonLeaveBlock %} | |
|
17 | {%- endblock nonLeaveBlock -%} | |
|
18 | 18 | |
|
19 | 19 | consider calling super even if block is leave block, we might insert more block later. |
|
20 | 20 | |
|
21 | 21 | #} |
|
22 | 22 | |
|
23 | {% block codecell scoped %} | |
|
24 | {% block in_prompt %}{% endblock in_prompt %} | |
|
25 | {% block input %}{% endblock input %} | |
|
26 | {% if cell.outputs %} | |
|
27 | {% block output_prompt %}{% endblock output_prompt %} | |
|
23 | {%- block codecell scoped -%} | |
|
24 | {%- block in_prompt -%}{%- endblock in_prompt -%} | |
|
25 | {%- block input -%}{%- endblock input -%} | |
|
26 | {%- if cell.outputs -%} | |
|
27 | {%- block output_prompt -%}{%- endblock output_prompt -%} | |
|
28 | 28 | {%- for output in cell.outputs -%} |
|
29 | 29 | {%- if output.output_type in ['pyout']%} |
|
30 | {% block pyout scoped %}{% endblock pyout %} | |
|
31 | {%- elif output.output_type in ['stream'] %} | |
|
32 | {% block stream scoped %}{% endblock stream %} | |
|
33 | {%- elif output.output_type in ['display_data'] %} | |
|
34 | {% block display_data scoped %}{% endblock display_data %} | |
|
35 | {%- elif output.output_type in ['pyerr'] %} | |
|
36 | {% block pyerr scoped %} | |
|
37 | {%- for line in output.traceback %} | |
|
38 | {% block traceback_line scoped %}{% endblock traceback_line %} | |
|
39 | {%- endfor %} | |
|
40 | {% endblock pyerr %} | |
|
41 | {%- endif %} | |
|
30 | {%- block pyout scoped -%}{%- endblock pyout -%} | |
|
31 | {%- elif output.output_type in ['stream'] -%} | |
|
32 | {%- block stream scoped -%}{%- endblock stream -%} | |
|
33 | {%- elif output.output_type in ['display_data'] -%} | |
|
34 | {%- block display_data scoped -%}{%- endblock display_data -%} | |
|
35 | {%- elif output.output_type in ['pyerr'] -%} | |
|
36 | {%- block pyerr scoped -%} | |
|
37 | {%- for line in output.traceback -%} | |
|
38 | {%- block traceback_line scoped -%}{%- endblock traceback_line -%} | |
|
42 | 39 | {%- endfor -%} |
|
43 | {% endif -%} | |
|
44 | {%- endblock codecell %} | |
|
40 | {%- endblock pyerr -%} | |
|
41 | {%- endif -%} | |
|
42 | {%- endfor -%} | |
|
43 | {%- endif -%} | |
|
44 | {%- endblock codecell -%} | |
|
45 | 45 | |
|
46 | {% block markdowncell scoped %}{% endblock markdowncell %} | |
|
46 | {%- block markdowncell scoped -%}{%- endblock markdowncell -%} | |
|
47 | 47 | |
|
48 | {% block headingcell scoped %} | |
|
49 | {% endblock headingcell %} | |
|
48 | {%- block headingcell scoped -%} | |
|
49 | {%- endblock headingcell -%} | |
|
50 | 50 | |
|
51 | {% block rawcell scoped %} | |
|
52 | {% endblock rawcell %} | |
|
51 | {%- block rawcell scoped -%} | |
|
52 | {%- endblock rawcell -%} | |
|
53 | 53 | |
|
54 | {% block unknowncell scoped %} | |
|
55 | {% endblock unknowncell %} | |
|
54 | {%- block unknowncell scoped -%} | |
|
55 | {%- endblock unknowncell -%} |
General Comments 0
You need to be logged in to leave comments.
Login now