3๐
โ
I added
slug_url_kwarg = 'uuid'
to the DetailView class and now it works BUT now I have aAttributeError at /posti/qNwEXBxXQdGI4KlQfoHWOA/ Generic detail view DetailView must be called with either an object pk or a slug.
slug_url_kwarg
must match your url regex group name (slug
in your case, which is default value for slug_url_kwarg
), so you shouldnโt have changed it
For details look at the piece of Django source code here โ https://github.com/django/django/blob/master/django/views/generic/detail.py#L8
๐คRoman Yakubovich
Source:stackexchange.com