title: how to make Qrcode scanner in django
body: <p>how i can make qrcode scanner in django like  <a href="https://webqr.com/" rel="nofollow noreferrer">this web</a> so i can see the result in text not in image video</p>
  <p>i already make the views.py like this</p>
  <pre><code>def camera_feed(request):
      stream = CameraStream()
      frames = stream.get_frames()
      return StreamingHttpResponse(frames, content_type='multipart/x-mixed-replace; boundary=frame')
  
  
  def detect(request):
      stream = CameraStream()
      success, frame = stream.camera.read()
      if success:
          status = True
      else:
          status = False
          
      return render(request, 'detect_barcodes/detect.html', context={'cam_status': status})
  </code></pre>
  <p>my camera_stream.py</p>
  <pre><code>class CameraStream(str):
      def __init__(self):
          self.camera = cv2.VideoCapture(0)
  
      def get_frames(self):
          while True:
              # Capture frame-by-frame
              success, frame = self.camera.read()
              if not success:
                  break
              else:
                  ret, buffer = cv2.imencode('.jpg', frame)
                  color_image = np.asanyarray(frame)
                  if decode(color_image):
                      for barcode in decode(color_image):
                          barcode_data = (barcode.data).decode('utf-8')                            
                  else:
                      frame = buffer.tobytes()
                      #hasil2 = b'--frame\r\n'b'Content-Type: image/jpeg\r\n\r\n' + barcode_frame + b'\r\n\r\n'                        
                      yield (b'--frame\r\n'
                             b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')
  </code></pre>
  <p>this is my urls.py</p>
  <pre><code>path('camera_feed', views.camera_feed, name='camera_feed'),
  path('detect_barcodes', views.detect, name='detect_barcodes'),
  </code></pre>
  <p>and i use the html like this</p>
  <pre><code>&lt;img src=&quot;{% url 'qrcode' request.path %}&quot; width=&quot;120px&quot; height=&quot;120px;&quot;&gt;
  </code></pre>
  <p>how i can pass the result in html?</p>