7👍
✅
Since you are using a named group in your urlpattern regex, the slug is passed as a keyword argument, not a positional argument. So you get it from self.kwargs['slug']
rather than self.args[0]
.
Source:stackexchange.com