Revision 314bdec9
added first attempt to do machine authentication
crm/robocrm/views.py | ||
---|---|---|
1 | 1 |
# Create your views here. |
2 |
|
|
3 |
def roboauth(request, rfid_tag, mach_number): |
|
4 |
r = robocrm.objects.filter(rfid=rfid_tag) |
|
5 |
auth_machines = r.machines.filter(id=mach_number) |
|
6 |
if auth_machines.count() > 0 : |
|
7 |
return HttpResponse("1") |
|
8 |
else |
|
9 |
return HttpResponse("0") |
|
10 |
|
Also available in: Unified diff