Well, this is a basic programming issue, and nothing to do with Python or Django.
Each time through your loop, you re-assign `tableC_QuerySet` to a new value. So, naturally, the value that it has at the end of the loop is whatever it had in the last iteration. If you want to get all the elements from each iteration, you'll need to put them into a list. For example:
values = []
for x in tableB_QuerySet:
values.extend(list(models.TableC.objects.filter(tableC_id = x.<fieldname>)))
In addition, there is almost certainly a more efficient way to do it, rather than doing a separate query for each tableB item, but without seeing more details of your models it's impossible to help further.
--
DR.