Graduate

Update flask

...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
11 <script type='text/javascript' src="{{url_for('static', filename='js/utils.js')}}"></script> 11 <script type='text/javascript' src="{{url_for('static', filename='js/utils.js')}}"></script>
12 <script type='text/javascript' src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 12 <script type='text/javascript' src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
13 <script type='text/javascript'> 13 <script type='text/javascript'>
14 -let tempCanvas = document.createElement("canvas");
15 function load_cascade() 14 function load_cascade()
16 { 15 {
17 let faceCascadeFile = 'haarcascade_frontalface_default.xml' 16 let faceCascadeFile = 'haarcascade_frontalface_default.xml'
...@@ -76,7 +75,7 @@ function submit() ...@@ -76,7 +75,7 @@ function submit()
76 type: "POST", 75 type: "POST",
77 url: "/register", 76 url: "/register",
78 dataType: "json", 77 dataType: "json",
79 - data: {'image':b64encoded, 'student_id':student_id 'student_name':student_name}, 78 + data: {'image':b64encoded, 'student_id':student_id, 'student_name':student_name},
80 success: function(data){ 79 success: function(data){
81 if (data.status == "success"){ 80 if (data.status == "success"){
82 alert("등록 성공"); 81 alert("등록 성공");
...@@ -98,13 +97,10 @@ var loadFile = function(event) { ...@@ -98,13 +97,10 @@ var loadFile = function(event) {
98 } 97 }
99 }; 98 };
100 99
101 -cv['onRuntimeInitialized']=()=>{ 100 +let tempCanvas = document.createElement("canvas");
102 - load_cascade();
103 -};
104 -
105 </script> 101 </script>
106 </head> 102 </head>
107 -<body class="w3-light-grey"> 103 +<body onload="cv['onRuntimeInitialized']=()=>{load_cascade();};" class="w3-light-grey">
108 <!-- w3-content defines a container for fixed size centered content, 104 <!-- w3-content defines a container for fixed size centered content,
109 and is wrapped around the whole page content, except for the footer in this example --> 105 and is wrapped around the whole page content, except for the footer in this example -->
110 <div class="w3-content" style="max-width:1400px"> 106 <div class="w3-content" style="max-width:1400px">
......