Hi,
If you want to see something in the queryset you need to query it :)
For example:
{% for question in
latest_question_list %} {{question.id }}{%endfor%}
Or you can take the last or first item?
{{ latest_question_list.first.id }}
Regards,
Andréas
Den tors 7 maj 2020 kl 07:55 skrev Mohse
Your view seems to have incorrect render.
Sent from Yahoo Mail on Android
On Thu, 7 May 2020 at 11:25, Mohsen Pahlevanzadeh
wrote: I have the following view function:
def index(request, question_id):
latest_question_list = User.objects.all() #Post.objec
I have the following view function:
def index(request, question_id):
latest_question_list = User.objects.all() #Post.objects.all()
template = loader.get_template('posts/index.html')
context = {
'latest_question_list': latest_question_list,
3 matches
Mail list logo