How to redirect to a different page in Django when I receive an input from a barcode scanner?

Viewed 213

The whole project is as follows: I'm trying to build a Django based web-app for my college library. This app when idle will be showing a slideshow of pictures on the screen. However when an input is received from the barcode scanner, it is supposed to redirect it to a different age containing information related to that barcode. I'm not able to figure out how to get an input from the scanner and only then redirect it to the page for 3 seconds containing the relevant information, after the interval, it should redirect back to the page containing the slideshow.

1 Answers

you should communicate with the bar-code scanner to receive scanning-done event which has nothing to do with django but only javascript or even an interface software which the user must install, like a driver, so you can detect the bar-code scanner from javascript(web browser) then you can get your event in javascript and redirect the page on the event or do whatever you want

Related