Monday, March 30, 2020

Re: HTML code not being read

Have you all ready use a content that define your content

On Mon, 30 Mar 2020, 17:14 Jeff Waters, <watersjg@gmail.com> wrote:
Hi

I have written some code that allows users of a website to comment on photos in a picture gallery, using a form. However, when I test the code, no comments are displayed.

It would appear that Django is not processing the following code (from my HTML file for the photo gallery), given that 'Comment by' is not displayed on screen:

            {% for comment in comments %}
            <div class="comments" style="padding: 10px;">
                <p class="font-weight-bold">
                    <h4>Comment by</h4> {{ comment.user }}
                    <span class=" text-muted font-weight-normal">
                        {{ comment.created_on }}
                    </span>
                </p>
                {{ comment.body | linebreaks }}
            </div>
            {% endfor %}

Does anyone have any suggestions as to how I can fix this, please?

Thank you.

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/4666d2ec-e4d8-492d-8203-03dfecd29d6a%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/CAKNQJk5Mys3t7WLeBatbZ7Mg8Bj4WaMabELqmWGKiUvHBguQ_Q%40mail.gmail.com.

No comments:

Post a Comment