Changes between Initial Version and Version 2 of Ticket #35345
- Timestamp:
- Mar 31, 2024, 1:03:26 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35345
- Property Has patch set
- Property Owner changed from to
- Property Status new → closed
- Property Resolution → invalid
-
Ticket #35345 – Description
initial v2 2 2 referencing from Tutorial part 1: 3 3 since we have created a new polls app in out mysite project we configured the mysite.url like this 4 ``` 4 {{{ 5 5 urlpatterns = [ 6 6 path("polls/", include("polls.urls")), 7 7 path("admin/", admin.site.urls), 8 8 ] 9 ``` 9 }}} 10 10 so when we render the page polls/index.html or namely, the index view in our poll app the base url would be localhost/polls/ 11 11 and with having this in our template : `<li><a href="/polls/{{question.id}}/">` 12 12 the GENERATED link would be : localhost/polls/polls/question_id **which raises an error** since we didn't describe such pattern in our urls.py file in polls app 13 ``` 13 {{{ 14 14 urlpatterns = [ 15 15 path("",view=views.index,name="index"), … … 18 18 path("<int:question_id>/vote/",view=views.vote,name="vote"), 19 19 ] 20 ``` 21 20 }}}