metzlar/cms-form-plugin — pull request #7 by Euphorbium (2014-03-19 19:47:43+00:00)
Title: Update cms_plugins.py

Now this works correctly. The form redirects to success page if no success url is set, but if both are set, it redirects to success url. I think this should be in the documentation.

Just think about your previous code: it had
> if not success_url and instance.success_page:

it evaluates differently than :
> if not (success_url and instance.success_page):

which would be better (this would work if either was set ) but stil would work incorrectly if both success url and success page were set. My proposed solution works in all possible ways: If either settings are set, if none are set and if both are set.