Note- This question was originally posted on SO before I completely understood what my issue was. However, since editing it to reflect the true state of affairs, the silence over there has been deafening. I only mention that because some people don't like it when similar questions are posted to more than one forum by the same person, so now you know why I'm doing it. Thanks for understanding.
I can't get my subclass of ListView to display my content on my own template, even though it will display on the default code_list.html. My template does come up, but the queryset simply isn't there. I tried switching template names, but that didn't work. I've tried a wide variety of tweaks to context, but none of them worked. I tested my queryset in the shell, and it worked fine. Debug toolbar says my query executed. So it just seems to be getting it onto my template.
This shows a list of all my Code objects
class CodeListViewAll(ListView):
model = Code
but if I modify it in even the slightest way, it does not
class CodeListViewAll(ListView):
model = Code
template_name='statute.html'
I wrote a functional view to accomplish the same goal, but I got the same result with my statute.html – no data
statute.html
{% block content %}
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-10">
{% for i in codelist %} can you see this? < -- Yes, "can you see this?" displays
<li>{{ codelist.arrow }}</li>
{% endfor %}
</div>
<div class="col-md-1">
</div>
</div>
{% endblock content %}
Statute extends base, but since the inheritance seems to be working everywhere else on this template, I assume that is not an issue.
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fbd4faca-0b86-49fa-bc25-de1a7d93c58e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/o4UKSTBtwyg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei3W2%2Bc2ro6TdSW6--CphE%2BPuymFarz_0%3DtKPKqLfm%2B4Xw%40mail.gmail.com.