On 5/3/07, Mi Reflejo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I don't know how to do it using form_for_model (I want to keep my "labels",
> "help_text", etc from models). Of course i could make my own Form class with
> each field but it's redundant and if i change my database struct i should
> change the code.

The easiest solution is to simply use 2 forms. Use form_for_model to
define one form for User, and one for the profile. Pass them both into
the template, check them both for validity, and save both if they are
ok.

> PD. Is there another way to create users than User.objects.create_user()?
> (create_user is setting first_name and last_name to '')

Well... yes, there is.

newuser = User()
newuser.save()

create_user() is just a manager-level wrapper around basic model
saving logic. Feel free to define your own implementation if you want
different behaviour.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to