from django.shortcuts import render from django.views.generic import ListView, TemplateView from .models import Scanner class IndexView(ListView): model = Scanner template_name = 'booker/index.html' def scanner(request, scanner_id): return render(request, 'booker/scanner.html', { 'scanner_id': scanner_id }) class SmartphoneScannerView(TemplateView): template_name = 'booker/smartphone_scanner.html'