how can i convert the result of raw sql to python object in django? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

how can i convert the result of raw sql to python object in django?

from_db_value(value, expression, connection) i dint find any proper explanation regarding this in django documentation

25th Jun 2020, 3:49 PM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar
1 Answer
+ 2
You could make a class and call its constructor by filling it with the row values. Perhaps use a list and fill it with objects depending on row count
27th Jun 2020, 7:07 AM
Dominique Abou Samah
Dominique Abou Samah - avatar