AttributeError: 'dict' object has no attribute 'objects' please help a friend
I have been on this for almost 12hrs and I don't seem to many any headway at finding what i am not doing right. Error message I keep getting is: Error Message k = fixture.objects.filter(api_football_fixture_id=id_fixture) AttributeError: 'dict' object has no attribute 'objects' views.py def get_score(request): if request.is_ajax() and request.POST: data = request.POST.get('date') score = get_scores(data) respond = {'message': 'operation successful'} return HttpResponse(json.dumps(respond), content_type='application/json') else: raise Http404 def get_scores(date): fixture = api_request(f'fixtures/date/{date}') for b in fixture['api']['fixtures']: if b['goalsHomeTeam'] is not None: home_score = str(b['goalsHomeTeam']) else: home_score = '' if b['goalsAwayTeam'] is not None: away_score = str(b['goalsAwayTeam']) else: away_score = '' extra_time = b['score']['extratime'] penalty = b['score']['penalty'] half_time = b['score']['halftime'] full_time = b['score']['fulltime'] match_status = b['status'] api_football_home_team_id =b['homeTeam']['team_id'] api_football_away_team_id =b['awayTeam']['team_id'] api_football_league_id = b['league_id'] id_fixture= b['fixture_id'] k = fixture.objects.filter(api_football_fixture_id=id_fixture) print(k)