Skip to content

Commit f30b1ef

Browse files
authored
update notes urls to use note_id as capture name; update note_history view to rename elem_id to note_id as parameter (#11949)
1 parent fa9bd73 commit f30b1ef

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dojo/notes/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from . import views
44

55
urlpatterns = [
6-
re_path(r"^notes/(?P<id>\d+)/delete/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.delete_note, name="delete_note"),
7-
re_path(r"^notes/(?P<id>\d+)/edit/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.edit_note, name="edit_note"),
8-
re_path(r"^notes/(?P<id>\d+)/history/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.note_history, name="note_history"),
6+
re_path(r"^notes/(?P<note_id>\d+)/delete/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.delete_note, name="delete_note"),
7+
re_path(r"^notes/(?P<note_id>\d+)/edit/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.edit_note, name="edit_note"),
8+
re_path(r"^notes/(?P<note_id>\d+)/history/(?P<page>[\w-]+)/(?P<objid>\d+)$", views.note_history, name="note_history"),
99
]

dojo/notes/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ def edit_note(request, note_id, page, objid):
141141
})
142142

143143

144-
def note_history(request, elem_id, page, objid):
145-
note = get_object_or_404(Notes, id=elem_id)
144+
def note_history(request, note_id, page, objid):
145+
note = get_object_or_404(Notes, id=note_id)
146146
reverse_url = None
147147
object_id = None
148148

0 commit comments

Comments
 (0)