#22214 closed Uncategorized (invalid)

Doc Code Mistake: No polls are available.

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

url: https://docs.djangoproject.com/en/1.6/intro/tutorial05/

The code:

self.assertContains(response, "No polls are available.")

should remove the latest ".", because the response is without "."

self.assertContains(response, "No polls are available")

Change History (1)

comment:1 Changed 17 months ago by bmispelon

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Hi,

Unless I'm mistaken, the index view being tested is the one defined in part 3 [1] and that one does include a period in the template:

{% if latest_poll_list %}
    <ul>
    {% for poll in latest_poll_list %}
        <li><a href="/polls/{{ poll.id }}/">{{ poll.question }}</a></li>
    {% endfor %}
    </ul>
{% else %}
    <p>No polls are available.</p>
{% endif %}

I'll mark this as invalid. Feel free to reopen if I've misunderstodd your report.

Thanks.

[1] https://docs.djangoproject.com/en/1.6/intro/tutorial03/#write-views-that-actually-do-something

Note: See TracTickets for help on using tickets.
Back to Top