This repository presents a scanner of QR codes using Django framework, considering HTML with JavaScript web pages.
The following softwares have to be configured / installed for running this application.
- Django framework for providing web services.
- Python 2.7 as the main programming language.
- pip, the PyPA recommended tool for installing Python packages.
- VirtualEnv for creating a Python environment with all (library) dependencies.
- Instascan for scanning QR codes.
- SQLite as the relational database management system.
- Bootstrap as the template of web pages.
- jQuery, a JavaScript library that we use to redirect HTTP requests.
To start our application, it is necessary to go to the root directory and to start a Django server, as follows:
cd $ROOT_DIRECTORY
python manage.py runserver
If you would like to test it in a mobile device, it is necessary to enable external accesses (considering the port 8000) in your firewall security configurations. Moreover, the Django initialization commandline should be replaced, as follows:
python manage.py runserver 172.16.4.104:8000
The folllowing URLs are available in this application:
- To scan QR codes in real time
http://$HOSTNAME:$PORT/scanner
- To analyze database records
http://$HOSTNAME:$PORT/admin/scanner/qrcode
P.S.: $HOSTNAME should be replaced by the hostname or IP address, e.g., localhost; and $PORT should be replaced by the configured port in Django project, e.g., 8000.