Monday, March 30, 2020

Re: Form not displaying

Thanks Ernest.

I'm not sure I follow (forgive me, I am very new to Django).

Given that template_name is defined earlier in the method as 'add_comment.html', surely what I've written is equivalent to:

return render(request, add_comment.html, {'image': image,
'comments': comments,
'new_comment': new_comment,
'comment_form': comment_form})

What should the code be instead?

Thanks

Jeff

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8e5fcc67-5a91-4371-a51a-9860a6cc78e3%40googlegroups.com.

No comments:

Post a Comment