<QuerySet [{'id': 1, 'inventory_number': 1, 'Сотрудник:_id': 1, 'name': 'Клавиатура и мышь Microsoft', 'is_active': True}, {'id': 2, 'inventory_number': 1, 'Сотрудник:_id': 1, 'name': 'Монитор Benq', 'is_active': True}, {'id': 3, 'inventory_number': 1, 'Сотрудник:_id': 1, 'name': 'ПК', 'is_active': True}]>
AttributeError: 'Equipment' object has no attribute 'user'
@login_required()
def management_views(request):
equipment = Equipment.objects.all()
users = Employees.objects.all()
for i in users:
print(i.user)
context = {'equipment': equipment}
return render(request,'panel.html', context)
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Test Test