Monday, March 30, 2020

Re: Form not displaying

There in your template...that closing form tag...is it a typing error?I can't see the second closing tag

On Mar 30, 2020 13:23, "Ernest Thuku" <ernesthuku@gmail.com> wrote:

Try this

On Mar 30, 2020 12:58, "Jeff Waters" <watersjg@gmail.com> wrote:
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.

--
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/CAPsfuodXhoe2DXi4t3fmmSoBV1kGzS%2BpxKU5cPhC8Ux%2BHF%3D%2BFw%40mail.gmail.com.

No comments:

Post a Comment