Monday, March 30, 2020

Re: HTML code not being read

Did you connect your template folder on settings.py ?

Sent from my iPhone

On Mar 30, 2020, at 11:06 PM, Aly_34_04 MR_34_04 <allaberdi16yazhanow@gmail.com> wrote:

show me your views 

On Monday, March 30, 2020 at 5:13:49 PM UTC+3, Jeff Waters 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/85705553-9cd4-49e2-878e-8c0a903bc79f%40googlegroups.com.

No comments:

Post a Comment