Answer the question
In order to leave comments, you need to log in
How to save queryset to list?
Let's say I have a query like this
get_quest = win_row.objects.filter(user_quest_id=uid, quest_lvl__lte=user_lvl)
current_user_lvl = UserAttribute.objects.filter(user_id = uid)
list = []
list.append(get_quest )
list.append(current_user_lvl )
context['get_quest'] = get_quest
context['current_user_lvl'] = current_user_lvl
{% for i in current_user_lvl %}
{{ i }}
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question