
from django.shortcuts import render
from django.contrib import messages
from django.shortcuts import redirect
import requests
from django.http import HttpResponse

# Create your views here.
def mOperator_page(request):
   response = requests.get('https://thingsaccess.com/rfid/index.php/Api/getMachineOperator')
   data_send = response.json()
   data_steps = data_send['response']
   if data_steps == 11:
         data_steps = [] 
   return render(request, 'machineOperator/machineOperator.html',context={'data_steps': data_steps})