Django Oscar mobile device QR Code scan

66 views
Skip to first unread message

sebasti...@gmail.com

unread,
Oct 27, 2022, 3:00:12 AM10/27/22
to Django users
Hello,

on a PC is Django Oscar in a Browser open with catalogue listview. Now i want to implement that i have on a mobile android device i have a QR Code Scanner how can send code to PC and in this QR Code is a article number and on PC this article number is automatical enter as keystrokes and then django oscar automatical recognize this article number and open detail view of this article.

Have anyone a idea how i can insert a javascript code that waiting for keystrokes? Have anyone experience with Android QR Code Scanner how sends content of QR Code as keystrokes to a pc and process it?

Have another developer interest to help me to implement this in django oscar?

Regards

Ryan Nowakowski

unread,
Oct 27, 2022, 9:48:10 AM10/27/22
to Django users
If I were trying to implement this I would:

1. Create a Django view for the Android device that scans a QR code
using a JavaScript QR code reader and saves the article number in a
Django model alongside a unique identifier for the android device.

2. Create a Django view that returns the url of the detail view for the
last article number scanned by a particular android device.

3. Add JavaScript to your catalogue listview template that polls the view
from #2 and redirects the PC's browser to the detail view.

Hope this helps,

Ryan N
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b776dd7e-2e43-40a5-be27-36abd68cba15n%40googlegroups.com.

Sebastian Jung

unread,
Oct 27, 2022, 12:18:58 PM10/27/22
to django...@googlegroups.com
I think i have now a idea. It exists on android apps where i can scan QR code and send it to PC. PC insert it as keystrokes in browser.

It exists javascript that Receive keystrokes and then i csn open url from detailview...

I think this is possible and a good idea...

Ryan Nowakowski

unread,
Oct 28, 2022, 9:38:52 AM10/28/22
to django...@googlegroups.com
If the only part of the problem you'd like help with is the keystroke in the browser part, you may not even need JavaScript. Would a normal HTML text input suffice?
Reply all
Reply to author
Forward
0 new messages