QR Code Scanner to sign-in person

Each user gets a physical card with a QR code on it. The QR code contains the unique account number of the user.

I want to create a webapp where we can use QR code to sign-in someone. We open the webpage that was made using Django. Use a handheld QR code scanner to scan the QR code. After scanning, either the user is checked in or it throws an error.

How can I create a page that constantly listens for a qr code to be scanned?

This is going to depend upon your QR Scanner driver and the libraries that they provide for the operating system that the scanner is attached to.

Since Django is running on the server and not in the browser, Django has very little to do with this. You’ll need to be using some JavaScript that can accept input from the scanner and then send it to the server.

If this is just a “check-in” process and you’re not using the QR code to authenticate them to the web site, it will be a lot easier to not do this as a web page. Write a standalone program to read the scanner and then POST the data back to the server.

Thanks, Ken.

When scanning the QR codes, it pretty much just instantly types what the QR code is. For an example, if I open notepad and I scan a QR code that says “Hello World”, it will instantly type “Hello World” in notepad. If I open chrome/firefox/IE, it will instantly type whatever the QR code translate to. Can we do something with this?

There is no generic answer to this. It all depends upon the scanner and whatever libraries, drivers, SDK, or other interfaces they may provide.

Hmm… I guess what I’m looking for is similar to multi factor authentication. When a website asks you to confirm your email address by entering a code that is sent to your email address and you copy and paste the code to the website, it automatically tells you whether the code is correct. no need to press the submit button. What is that called and how can I implement it?

That would be JavaScript running on the page listening to the keypress events. When the appropriate number of characters have been received, then it would make an AJAX call to the server.

You still have the separate and independant issue of getting the scanner driver to submit the data to the browser input field.

You seriously need to write a book- specifically for people that would like to learn your methods. You have a clear way of getting points across that I find easy to learn from. Thank you for all your time and input for all of us that come here to learn.

Solution:
I bought a QR code scanner that presses enter after each scan.
I created a form that asks for a QR code input and I used “blur” to keep the focus on the input for the QR code. After scanning the QR code, it hits enter which submits the form.