diff --git a/smartmin/views.py b/smartmin/views.py index 7e3a5c7..279d185 100644 --- a/smartmin/views.py +++ b/smartmin/views.py @@ -1094,12 +1094,9 @@ def form_valid(self, form): self.object = self.post_save(self.object) messages.success(self.request, self.derive_success_message()) - if "HTTP_X_FORMAX" not in self.request.META: - return HttpResponseRedirect(self.get_success_url()) - else: - response = self.render_to_response(self.get_context_data(form=form)) - response["REDIRECT"] = self.get_success_url() - return response + response = self.render_to_response(self.get_context_data(form=form)) + response["REDIRECT"] = self.get_success_url() + return response except IntegrityError as e: message = str(e).capitalize()