11👍
✅
def get_success_url(self, **kwargs):
# obj = form.instance or self.object
return reverse("profile", kwargs={'pk': self.object.pk})
You expect a primary key on the request object, which makes no sense. The instance (self.object) is where you should retrieve the primary key from.
Source:stackexchange.com