Code review comment for lp:~dooferlad/offspring/ssh_ui_mods

Revision history for this message
Guilherme Salgado (salgado) wrote :

Ok, so after admitting this code was too complicated for my small brain I decided to try and simplify it a bit. lp:~salgado/offspring/ssh_ui_mods has a simpler version of this, with a much simpler form class, no need for the custom field and validation on the lowest possible level. As a bonus I've also fixed a bug in which the +editcredentials page was setting some attributes back to their default values because these fields were not in Meta.exclude, but also weren't rendered in the template (the list of fields rendered there are hard-coded to just lp_user and lp_ssh_key).

The key was using separate form classes depending on whether you're creating or editing a project and moving the validation to the model so that it's used in both forms. Please let me know if it looks good, James, or if you see any issues with it: https://code.launchpad.net/~salgado/offspring/ssh_ui_mods/+merge/81641

« Back to merge proposal