Skip to content

Commit

Permalink
realpython#575 update entry id
Browse files Browse the repository at this point in the history
  • Loading branch information
kazweda committed Sep 2, 2024
1 parent d7baddf commit 99c4b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django-diary/source_code_step_5/entries/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class EntryUpdateView(UpdateView):
fields = ["title", "content"]

def get_success_url(self):
return reverse_lazy("entry-detail", kwargs={"pk": self.entry.id})
return reverse_lazy("entry-detail", kwargs={"pk": self.object.pk})


class EntryDeleteView(DeleteView):
Expand Down

0 comments on commit 99c4b00

Please sign in to comment.