I am trying to pass a queryset value as an argument to a method but it 
won't proceed; it shows no error. And I tried printing it like this:

for id in Review.objects.values_list('id', flat=True):

print("ID: " + id)

Output:
1

However, it worked and looped when I changed it to this:

for id in Review.objects.values_list('id', flat=True):

print(id)

Output:
1
2
3
4
5


My other problem is when using a queryset value in my method:

This works:

insert_to_db(id)


But this does not:

insert_to_db(id, result)



Any help would be greatly appreciated :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8003bf92-c580-4d10-9e42-d4fade579bd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to