reverse vs. @permalink

First, thanks for making these videos. This is just a comment to note a very recent recommendation - the official 1.5 Django documentation no longer recommends the use of the permalink decorator, with the reasoning provided that it is no longer needed since the introduction of reverse. Using reverse, at least for me, makes the code easier to read. Looking forward to the next video.

Sorry You must be a logged in, registered user to answer a question.

Answers

This worked for me:

def get_absolute_url(self):
    return reverse('blog:detail', kwargs={"slug":self.slug})

It makes sense to get rid of it. It's two approaches to the same solution, which violates the Tao of Python.

That said, boy, is that gonna be a hard habit to break :)