On 03/25/2010 02:37 PM, Jim N wrote:

Very interesting, Tom.

I have inserted this code, substituting my profile model name
(QotdUser) for UserProfile.  It does create a row in QotdUser, but the
row is empty of course.

More importantly, if I create a user via the admin interface (http://
127.0.0.1:8000/admin/auth/user/add/) there's no apparent way to edit
any of the fields of my profile model.

Or if I create the user some other way, would I be able to pass
arguments to the User model to populate the profile?

Finally, how do I access the profile, is it like

   my_user_profile = User.objects.get(username="jim").get_profile() ?

Thanks for the help.


I have done this, and I think the following link will help
http://pyxx.org/2008/08/18/how-to-extend-user-model-in-django-and-enable-new-fields-in-newforms-admin/

You need to unregister the current model admin for the user model and create a new one (based on the old one) that includes your user profile "inline". When you understand that last sentence, you will understand what is going on.

Good luck.


--
Carl Zmola
czm...@woti.com


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to