Skip to content

Iteration 2 Plan

Vichisorn edited this page Sep 18, 2020 · 4 revisions

Iteration 2 Plan

Goal: improve the navigation and page layout, and add an ending date for voting on a poll. Another objective is to externalize configuration data for security and portability.

Features

  1. In the Question class, add an end_date attribute that is the ending date for voting.
    • You need run migrations after this, to update the database schema.
  2. In the Question class, add two methods:
    • is_published returns true if the current date is on or after the question’s publication date
    • can_vote returns true if voting is currently allowed for this question Create unit tests for is_published and can_vote.
  3. If someone navigates to the polls detail page for a poll where voting is not allowed, redirect them to the polls index page and show an error message.
    • Suggest you use the “Django Messages Framework” for this. It’s simpler than passing an error_message via the context.
    • Messages Framework is shown in topics list on class github.io site.
  4. Improve navigation.
    • On the polls index page, add “vote” and “results” links for each question.
    • Only show “vote” link for a poll where voting is allowed.
    • On the polls detail page, add a “Back to List of Polls” link so a person can go back without voting. You can use your choice of text instead of “Back to List of Polls”.
    • On the voting results page, also add a “Back to List of Polls” link.
  5. Improve the appearance of the voting results page. Make the votes align in a column, omit the word “votes” after the count – it’s redundant, remove the bullets.
  6. Index page - show all published poll questions, not just 5 most recent.
    • Sort them so that the newest questions are first
  7. Externalize configuration data.
    • Remove the value of SECRET_KEY and DEBUG from settings.py and put their values in a .env file.
    • Don’t commit .env to Git.
    • See Externalize Configuration for how to do this.
    • Use either the python-decouple or django-environ package. They are described on the class github.io site under “Externalize Configuration”.

Tasks

All tasks should be recorded on Project Board for Iteration 2.

Evaluation Criteria

to be added.

Retrospective and TA Suggestions

to be added.

Back to Home

Clone this wiki locally