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.
you need to add the user pk or slug in the url so that django can retrieve the user using this pk or slug so edit the url to be like this
path('/',UserProfileDetailView.as_view(),name = 'detail'),
but make sure that your slug equal the username of the user , to do this override the save method in your model to be like this
def save(self, *args, **kwargs):
self.slug = self.username
super(Your_Model_Name, self).save(*args, **kwargs)
make sure to change 'Your_Model_Name' with your model class name