I encountered unexpected behaviour when attempting a basic form submit. When the form was submitted two calls to the server were made and two objects were created in the datastore.
The form’s values are sent to the server associated with the
/create URL, an object is created and persisted to the datastore and the application opens a page where the user can add additional information to the newly created object.
While the behaviour was triggered by form submission, the issue was actually associated with how the application rendered the view after submission. The page loaded after form submission included a Facebox. Facebox initialization causes a second set of requests on load. So, if posting to
/create, Facebox will start a second set of requests with the base URL set to
/create. A fix is to redirect to a URL which handles get requests after doing a post, in this way the server hit in the initial submission is not requested twice.