Yeah , I am sure both are using same template. I am using same template on many pages. On all pages it's working fine. Only on one page question answer it's not working as expected. I couldn't find any solution till now.
On Thursday, November 5, 2015 at 8:48:05 PM UTC+5:30, Collin Anderson wrote: > > Hello, > > Are you sure they're using the same template? (If you change something > does it actually affect both views?) > > Is one of the views using mark_safe? > > Collin > > On Tuesday, October 27, 2015 at 9:29:02 PM UTC+1, sonu kumar wrote: >> >> I am having two views both are extending from same base.html and both of >> them have loaded same template tags, but one is escaping string using safe >> and other is not what could be >> Code >> >> view 1 >> >> {% extends 'base.html' %} >> {% load inplace_edit mezzanine_tags rating_tags keyword_tags comment_tags >> nano_tags staticfiles %} >> >> ... >> >> {% comments_for object %} >> >> ... >> >> view 2 >> >> {% extends "base.html" %} >> >> {% load inplace_edit mezzanine_tags comment_tags keyword_tags nano_tags i18n >> future staticfiles %} >> >> ... >> >> {% comments_for blog_post %} >> >> ... >> >> >> view3 (comment.html) >> >> {% load i18n mezzanine_tags comment_tags nano_tags future %} >> >> ... >> >> <div class="comment-description">{{ comment.comment|safe }}</div> >> >> ... >> >> >> As we can see both view 1 and 2 are using same function so it would be using >> same template but in view2 safe is working and in view1 it's not working. >> >> >> What could be the reason for this ? >> >> >> -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fb56455d-c5cd-4ed8-88ce-127201d58ffb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.