This sample demonstrates how to use Dynamic Web TWAIN and Django to create a straightforward online document scanning application in just a few lines of code.
Django
python -m pip install Django
python -m django --version
Configure the static files in djangodwt/settings.py
:
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "../../sdk")
]
Insert the license key in index.html
:
Dynamsoft.DWT.ProductKey = 'LICENSE-KEY';
Execute the following commands to run the project:
python manage.py makemigrations
python manage.py migrate --run-syncdb
python manage.py runserver
Open a web browser and navigate to http://127.0.0.1:8000
.
Online Document Scanning Using Python Django and Dynamic Web TWAIN