mrdmnd/ittopt — pull request #2 by sredmond (2014-06-15 08:04:36+00:00)
Title: Improvements to TTOpt

Hey Matt!
I finally got around to improving the TTOpt site. I threw out passing values to the template in favor of session management, which a) makes the code a lot cleaner, b) ensures that the user's information will persist throughout browser logins/tabs/etc (since it's stored in encrypted cookies). I also simplified the form handling (it was rather repetitive). Lastly, I fixed the routing system. When users made a POST request to `/optimize/` and tried to navigate back, the browsers drops a frightening `Confirm form resubmission`. Here, however, the page responds to the POST, and then redirects back to the user-friendly homepage.