1

for example lets say

books.objects.raw(....)

the (...) are a representation of the sql parameters for example as seen in the django docs https://docs.djangoproject.com/en/3.2/topics/db/sql/#:~:text=Django%20gives%20you%20two%20ways,ORM%20before%20using%20raw%20SQL! when i try to iterate through the above oject like so

[print(x) for x in books.ojects.raw(...)]

I get this from my logs below

django.db.utils.ProgrammingError: can't adapt type 'dict'
Chowa C
  • 41
  • 5
  • Does this help ? https://stackoverflow.com/a/59170562/13964753 – Guillaume May 14 '21 at 00:26
  • 1
    @Guillaume thanks well figured it out though...the issue was as i'm in postresql,the manner in which it handles dict is different from the way python/django traditionally does it – Chowa C May 14 '21 at 11:42

0 Answers0