Skip to content

Commit

Permalink
fix: add success_url to update view
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Jan 15, 2024
1 parent ba5cb76 commit fc8e6ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apis_core/generic/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ def get_form_class(self):
)
return modelform_factory(self.model, form_class)

def get_success_url(self):
return reverse(
"apis:generic:list",
args=[self.request.resolver_match.kwargs["contenttype"]],
)


class Autocomplete(
GenericModelMixin, PermissionRequiredMixin, autocomplete.Select2QuerySetView
Expand Down

0 comments on commit fc8e6ee

Please sign in to comment.