Skip to content

Commit

Permalink
Merge pull request #199 from nyaruka/remove-formax-ref
Browse files Browse the repository at this point in the history
Smartmin doesn't concern itself with formax
  • Loading branch information
ericnewcomer authored Nov 25, 2024
2 parents 4f69300 + f406b13 commit 2a45a91
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions smartmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,12 +1094,7 @@ 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
return HttpResponseRedirect(self.get_success_url())

except IntegrityError as e:
message = str(e).capitalize()
Expand Down

0 comments on commit 2a45a91

Please sign in to comment.