Submitting PyErrata Reports
The next major functional area in PyErrata serves to implement user-controlled submission of new comment and errata reports. As before, let’s begin by getting a handle on this component’s user-interface model before inspecting its code.
User Interface: Submitting Comment Reports
As we’ve seen, PyErrata supports two user functions: browsing the reports database and adding new reports to it. If you click the “General comment” link in the Submit section of the root page shown in Figure 14-2, you’ll be presented with the comment submission page shown in Figure 14-16.
Figure 14-16. Submit comments, input page
This page initially comes up empty; the data we type into its form fields is submitted to a server-side script when we press the submit button at the bottom. If the system was able to store the data as a new database record, a confirmation like the one in Figure 14-17 is reflected back to the client.
Figure 14-17. Submit comments, confirmation page
All fields in submit forms are optional except one; if we leave the “Description” field empty and send the form, we get the error page shown in Figure 14-18 (generated during an errata submission). Comments and error reports without descriptions aren’t incredibly useful, so we kick such requests out. All other ...