I'd suggest using a custom form class, and checking for a bound user object in its __init__ method, which if present indicates it's the update form, and not signup, and you can then modify the attributes of each field programmatically. This would probably turn out to be less code that defining a form class for each.
On Wed, Jan 27, 2016 at 7:04 AM, <[email protected]> wrote: > I want to allow new users to register to a mezzanine based site with > minimal information (i.e. email and password) and allow them to update > their profile information once they are registered. Therefore I would like > to display a form with only the two required fields during signup and the > "full" ProfileForm during profile_update. > > Looking at the code in mezzanine.accounts I understand that "signup" view > as well as the "profile_update" view use the same form (i.e. > ACCOUNTS_PROFILE_FORM_CLASS). I know I could overcome this by writing my > custom signup view but is there any other way to solve this so I can keep > using the build-in code? > > If not: Would it make sense to allow the definition of different form > classes for signup and profile_update? Many modern websites try to > encourage registration by asking only for minimal information during > registration but allow users to add addtional profile information later. > > Regards Chris > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
