I have a custom article.html template that is overriding the default article.html template that comes with the aldryn newsblog plugin. In this template I have 2 lines to include some custom functionality:
{% include 'comment_form.html' %}
{% include 'list_comments.html' %}
Here are those 2 template files in detail:
list_comments.html template:
{% load cms_tags staticfiles sekizai_tags %}
{% if comments %}
{% for item in comments %}
<div class="comment paragraph">
<h4>{{ item.author }}</h4>
<p>{{ item.comment }}</p>
<p>{{ item.date }}</p>
</div>
{% endfor %}
{% else %}
<p>No comments exist on this blog. Be the first to comment!</p>
{% endif %}
{{ another }}
{{ thisdoesntexist }}
and comment_form.html
{% load cms_tags staticfiles sekizai_tags %}
<div id="comment_form">
<div class="container constrained paragraph">
<h5>Submit a comment</h5>
<form method="post">
{% csrf_token %}
{{ comment_form }}
<input type="hidden" name="page" value="{{ article.id }}">
<input type="submit" value="Submit Comment">
</form>
</div>
And views.py I have 2 functions to return views with context variables:
def display_form(request):
comment_form = CommentForm()
return render(request, 'comment_form.html', {'comment_form': comment_form})
def get_blog_comments(request):
qs = BlogComment.objects.all()
context = {'comments': qs, 'another': 'TEST STRING'}
return render(request, 'list_comments.html', context)
And in both templates, the context variables are outputting nothing. I am at a loss for what I'm doing wrong. I copied the code almost directly from the django tutorial on forms. django.template.context_processors.request is included in my settings.py context_processors.
I'm not sure if my {{ thisdoesntexist }} variable would throw an error or not, but it's not. the templates are displaying all other html except the context variables, so it's not a template linking issue.
EDIT:
urls.py
urlpatterns = [
url(r'^filer/', include('filer.urls')),
url(r'^location/', include('locations.urls')),
url(r'^captcha/', include('captcha.urls')),
url(r'^', include('cms.urls')),
]