Hey Carlton 👋🏼 I created a view with a custom lookup_field but I noticed the create form failed to redirect on success because it was still trying to use pk. Unless I'm completely missing something, should get_success_url be updated to handle custom lookups, maybe using Role.reverse?
def get_success_url(self):
...
if self.role == Role.DELETE:
success_url = Role.LIST.reverse(self)
else:
success_url = Role.DETAIL.reverse(self, self.object)
return success_url
Hey Carlton 👋🏼 I created a view with a custom
lookup_fieldbut I noticed the create form failed to redirect on success because it was still trying to usepk. Unless I'm completely missing something, shouldget_success_urlbe updated to handle custom lookups, maybe usingRole.reverse?