Well I am facing error and it\'s now its been two days to this question and still stuck on this mistake, anybody can help and able to fix this. I am new in Django and need help.
Set slug_url_kwarg--(Django Doc) and slug_field--(Django Doc) attributes on your view class
class UserProfileDetailView(DetailView):
slug_url_kwarg = "username" # this the `argument` in the URL conf
slug_field = "your_model_field" # this is the model field name.
# Rest of your code