[Answer]-Django url name, some points I'm not sure about

1πŸ‘

βœ…

A few things:

  1. question.id in the url tag is the value passed to the url pattern via the view. The template is specified in the view, but this value ensures a unique object (question) in the context.
  2. Correct
  3. The name of the view is β€œvote” not question_id. This is shown in the url pattern (views.vote)
  4. You can pass as many values as needed via the url tag in order to match up with your pattern. Just ensure these values are made available via your view.

Leave a comment