Alternate user fields

16 views
Skip to first unread message

raj

unread,
Jun 18, 2011, 1:17:07 AM6/18/11
to Django users
Hey guys,

I've been trying to figure out how to add more fields in the auth user
part of django. I looked through dozens of tutorials, and tried a lot
of things to no avail.
I simply ask this,
If a user were to sign up on my site, and he/she was required to
insert a skype SN, aim SN, etc.. How would one go about doing so?

I attempted to add fields into the User profile in the admin site, but
i couldn't do so. Would it be better to create an app that handles
this part (a new table), and it shares a relation with the auth user?
Thank you.
-Raj

Biaggiotti Alberto

unread,
Jun 18, 2011, 2:46:37 AM6/18/11
to django...@googlegroups.com
Hi

error 502 bad gateway on www.djangoproject.com from Italy


Albert

creecode

unread,
Jun 18, 2011, 10:28:06 AM6/18/11
to django...@googlegroups.com
Hello Raj,


On Friday, June 17, 2011 10:17:07 PM UTC-7, raj wrote:

I've been trying to figure out how to add more fields in the auth user
part of django. I looked through dozens of tutorials, and tried a lot
of things to no avail.

Martin

unread,
Jun 18, 2011, 10:33:28 AM6/18/11
to django...@googlegroups.com
Do you know that every time you ask questions on mailing lists without googling, a kitten dies? And a pony!



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


raj

unread,
Jun 18, 2011, 11:52:44 AM6/18/11
to Django users
I've googled alot about this. Trust me. And when I use the
AUTH_PROFILE_MODULE way, I am not getting the extra fields to show up
on my admin site. Can someone show me how to use it this way? I create
a model in an app, create additional fields in a UserProfile class,
and i syncdb, but nothing shows up in the auth_user section in the
admin page. Help please. Thank you.

On Jun 18, 10:33 am, Martin <martin.brochh...@googlemail.com> wrote:
> Do you know that every time you ask questions on mailing lists without
> googling, a kitten dies? And a pony!
>
> http://stackoverflow.com/questions/44109/extending-the-user-model-wit...https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional...http://www.djangobook.com/en/1.0/chapter12/#cn222

creecode

unread,
Jun 18, 2011, 12:40:37 PM6/18/11
to django...@googlegroups.com
Hello Raj,


On Saturday, June 18, 2011 8:52:44 AM UTC-7, raj wrote:

And when I use the
AUTH_PROFILE_MODULE way, I am not getting the extra fields to show up
on my admin site. Can someone show me how to use it this way? I create
a model in an app, create additional fields in a UserProfile class,
and i syncdb, but nothing shows up in the auth_user section in the
admin page.

You probably need to register your UserProfile with the admin < https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin >.

Toodle-loooooooo.............
creecode

raj

unread,
Jun 20, 2011, 2:39:22 AM6/20/11
to Django users
Its asking me to locate this admin.py file inside my application. I
can't find this file. Should I just make one inside an application
(after running the startapp function)?

On Jun 18, 12:40 pm, creecode <creec...@gmail.com> wrote:
> Hello Raj,
>
> On Saturday, June 18, 2011 8:52:44 AM UTC-7, raj wrote:
>
> And when I use the
>
> > AUTH_PROFILE_MODULE way, I am not getting the extra fields to show up
> > on my admin site. Can someone show me how to use it this way? I create
> > a model in an app, create additional fields in a UserProfile class,
> > and i syncdb, but nothing shows up in the auth_user section in the
> > admin page.
>
> You probably need to register your UserProfile with the admin <https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contr...
>
> >.
>
> Toodle-loooooooo.............
> creecode

Kenneth Gonsalves

unread,
Jun 20, 2011, 2:43:12 AM6/20/11
to django...@googlegroups.com
On Sun, 2011-06-19 at 23:39 -0700, raj wrote:
> Its asking me to locate this admin.py file inside my application. I
> can't find this file. Should I just make one inside an application

yes
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

raj

unread,
Jun 20, 2011, 3:03:59 AM6/20/11
to Django users
Ya i got that working. Just another quick question, the django auth
system took care of all the login/logout pages. Now that i have a
changed user class up and running, will django automatically adapt to
the new class? Like, in the html, if it says {% user.is_authenticated
%}, will it automatically attribute that to the new user class? Thank
you.

Kenneth Gonsalves

unread,
Jun 20, 2011, 3:08:12 AM6/20/11
to django...@googlegroups.com
On Mon, 2011-06-20 at 00:03 -0700, raj wrote:
> Ya i got that working. Just another quick question, the django auth
> system took care of all the login/logout pages. Now that i have a
> changed user class up and running, will django automatically adapt to
> the new class? Like, in the html, if it says {% user.is_authenticated
> %}, will it automatically attribute that to the new user class? Thank
> you.

no

raj

unread,
Jun 20, 2011, 5:16:03 PM6/20/11
to Django users
Sorry, can you give me more details. What other things would I have to
do to make these changes? thank you.

On Jun 20, 3:08 am, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> On Mon, 2011-06-20 at 00:03 -0700, raj wrote:
> > Ya i got that working. Just another quick question, the django auth
> > system took care of all the login/logout pages. Now that i have a
> > changed user class up and running, will django automatically adapt to
> > the new class? Like, in the html, if it says {% user.is_authenticated
> > %}, will it automatically attribute that to the new user class? Thank
> > you.
>
> no
> --
> regards

DrBloodmoney

unread,
Jun 20, 2011, 6:24:47 PM6/20/11
to django...@googlegroups.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...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>

I usually just write OneToOne against the User model for profiles. The
User.get_profile feels like such an anti-pattern and I think it's
going to go bye-bye sometime in the future anyways (particularly if we
get some kind of mechanism to lazy load a developer-defined User
model).

Reply all
Reply to author
Forward
0 new messages