File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
introduction/templates/Lab/A9 Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,13 @@ <h4>Some Example</h4>
1919 </ ul >
2020
2121 < form enctype ="multipart/form-data " id ="a9_form2 " method ="POST " style ="display: flex;flex-direction: column;align-items: center;margin-bottom: 50px; ">
22+ {% csrf_token %}
2223 < input type ="file " name ="file " id ="a9_file " />
2324 < input type ="text " name ="function " id ="a9_function " placeholder ="function "/>
2425 < button type ="submit " id ="a9_submit " > Submit</ button >
2526 </ form > < br > < br >
2627
28+
2729 {% if success %}
2830 < div id ="img_container " style ="margin-bottom : 50px ">
2931 < img src ='data:image/jpeg;base64,{{img_str_ref}} ' style ="width: 48% "/>
@@ -88,7 +90,11 @@ <h4>Some Example</h4>
8890 form . submit ( ) ;
8991 }
9092 { % if error % }
91- alert ( "{{ data }}" ) ;
93+ < input type = "hidden" id = "data" value = "{{ data }}" >
94+ < script >
95+ alert(document.getElementById("data").value);
96+ </ script >
97+
9298 {% endif %}
9399
94100</ script >
You can’t perform that action at this time.
0 commit comments