On Sep 16, 7:37 am, Rodney Topor <[EMAIL PROTECTED]> wrote:
> The User Authentication docs say "The most basic way to create users
> is to use the create_user() helper function...".  But I can't see in
> the docs a description of a less basic / more sophisticated way to
> create users.  For example, create_user() allows you to provide a
> username, email and password, but does not allow you to provide a
> first_name and last_name.  These have to be set separately.
>
> More challengingly (if that's a word), what is the best way to create
> and process forms for user creation and update when users have an
> associated profile with additional fields, as advocated in the docs?
> All solutions I've constructed are disappointingly complex and
> unwieldy by Django standards.
>
> Rodney

User is just a model like any other, so you can always create it via
the standard syntax:

u=User.objects.create(username='daniel', email='[EMAIL PROTECTED],
first_name='daniel', last_name='roseman'')

but you need to set the password separately, as it needs to be a
hashed value:

u.set_password('mypassword')

--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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