Re: how to create 2 different kind of user profiles using django python

2016-10-30 Thread ADEWALE ADISA
let me know how to create 2 various kind of > user profiles in django. I am doing a hostel management system using django > where in I have 2 kinds of users one is a student and the other is the > warden. > > -- > You received this message because you are subscribed to the Googl

Re: how to create 2 different kind of user profiles using django python

2016-10-30 Thread Amandeep Singh
creating two different > authorization groups for student and warden. > https://docs.djangoproject.com/en/1.10/topics/auth/ > default/#topic-authorization > > On Sun, Oct 30, 2016 at 7:18 PM, YOGITHA A N > wrote: > >> Hey, >> >> I am new to django . Please

how to create 2 different kind of user profiles using django python

2016-10-30 Thread YOGITHA A N
Hey, I am new to django . Please let me know how to create 2 various kind of user profiles in django. I am doing a hostel management system using django where in I have 2 kinds of users one is a student and the other is the warden. -- You received this message because you are subscribed to

Re: Django Multiple User Profiles Best Practices

2016-05-05 Thread Sudhanshu Shekhar
On Tue, May 3, 2016 at 11:47 AM, Peter of the Norse wrote: > On Apr 6, 2016, at 9:41 PM, Sudhanshu Shekhar > wrote: > > Hi, > > I am creating a tutor-student forum using Django. For which I need to have > two different user profiles, one for students and one for teachers. &

Re: Django Multiple User Profiles Best Practices

2016-05-02 Thread Peter of the Norse
> On Apr 6, 2016, at 9:41 PM, Sudhanshu Shekhar wrote: > > Hi, > > I am creating a tutor-student forum using Django. For which I need to have > two different user profiles, one for students and one for teachers. However, > I am unsure about the best way to do this. I a

Django Multiple User Profiles Best Practices

2016-04-06 Thread Sudhanshu Shekhar
Hi, I am creating a tutor-student forum using Django. For which I need to have two different user profiles, one for students and one for teachers. However, I am unsure about the best way to do this. I am currently following the below approach: class UserProfile: user = models.OneToOneField

Re: User Profiles "user.get_profile()" returns 'matching query does not exist.'

2014-03-28 Thread Brian Sanchez
try: except: it worked thank you!! On Saturday, September 20, 2008 9:14:42 PM UTC-4, Paddy Joy wrote: > > The error message is telling you that the user has no profile > (Specifically there is no record in the table schedule.profile related > to the user). > > Your app needs to take care of c

Re: Only one profile type of multiple user profiles types gets created.

2012-10-24 Thread Nicolas Emiliani
> The thing is that now the only profile that ever gets created when > creating a user > is AgentProfile. I can't get it to create an AuditorProfile not even by > setting the agency > field on the form. > > > Ok, just for the record, I did it the shameless way. Only one profile class with an profi

Only one profile type of multiple user profiles types gets created.

2012-10-22 Thread Nicolas Emiliani
Hi! I'm trying to use different types of profiles on django 1.4, I basically followed this : https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users The thing is that the docs only apply if you have one profile type, and i have four. Doing some research i fo

Multiple User Profiles using multi-table inheritance and Userena

2012-05-26 Thread James Rivett-Carnac
This is a question that gets asked in many forms, but I am having issues with the multi-table inherence method of doing this with Userena. I have strong reasons for needing multiple profile types which I won't go into here. i put example code in the following gist: https://gist.github.com/27928

Re: Editing custom user profiles information in the admin panel

2012-04-06 Thread Ejah
I believe not, as user is a fk in the profile class, and you can only access the profile through get_profile, it seems a query to me. On 7 apr, 03:46, abisson wrote: > Okay... and how is the SQL in the back? Does it do joins between the > two tables or what? That slows down a lot no? > > On Apr 6

Re: Editing custom user profiles information in the admin panel

2012-04-06 Thread abisson
Okay... and how is the SQL in the back? Does it do joins between the two tables or what? That slows down a lot no? On Apr 6, 9:11 am, Ejah wrote: > Hi, > You must add your app to the installed apps. Editting through the > admin requires you to register an admin form for your profile. Syncdb > and

Re: Editing custom user profiles information in the admin panel

2012-04-06 Thread Ejah
Hi, You must add your app to the installed apps. Editting through the admin requires you to register an admin form for your profile. Syncdb and you can edit. Hth On 6 apr, 05:56, abisson wrote: > Good evening, > > I just tried the followinghttps://docs.djangoproject.com/en/1.4/topics/auth/ > in o

Editing custom user profiles information in the admin panel

2012-04-06 Thread abisson
Good evening, I just tried the following https://docs.djangoproject.com/en/1.4/topics/auth/ in order to add some custom fields to my users. I just looked in the DB and admin panel, and these new fields were not added to the auth_user table, nor the User Admin Panel. I created a new app that contai

Re: Many user profiles

2011-06-21 Thread gontran
0, 9:54 am,gontran wrote: > > > Hello evreybody, > > > I wonder how to deal with many user profiles. > > I need to store different informations depending on the status of my > > users. > > > I have a generic UserProfile class: > > > class UserProfile(m

Re: Many user profiles

2011-06-20 Thread francescortiz
Try doing this in your models.py: def get_profile(self): ...your code to get the profile for a the user... User.get_profile = get_profile On Jun 20, 9:54 am, gontran wrote: > Hello evreybody, > > I wonder how to deal with many user profiles. > I need to store different

Many user profiles

2011-06-20 Thread gontran
Hello evreybody, I wonder how to deal with many user profiles. I need to store different informations depending on the status of my users. I have a generic UserProfile class: class UserProfile(models.Model): user = models.OneToOneField(User, primary_key=True) role = models.CharField

Re: user profiles

2011-03-06 Thread Shawn Milochik
What have you read and what have you tried? When you tried those things, what errors or unexpected results did you get? Without that information nobody can help you. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

user profiles

2011-03-06 Thread Rich
hi i am trying to create user profiles with django , id like a user to be able to log in through the django admin site and add things to their profile, then view the profile on the profile page does anyone know of any tutorial created on how to set something like this up? ive been reading and

Re: Custom User Profiles + Signals

2011-03-02 Thread Jeremiah
So continuing with this... I got the print-outs to work (I still need to try Stefano's suggestion)... I register a new user (duh6) via my register page and in the output for the dev server, I see: in myproject.cc.models: for user , pr ofile already exists in cc.models: for user , profile alread

Re: Custom User Profiles + Signals

2011-03-02 Thread bruno desthuilliers
On 2 mar, 19:31, Jeremiah wrote: (snip) >> Given the above statement, I assume the "models.py" file you're >> talking about is not the one where you define your UserProfile class. (snip) > It is the same models.py file with the UserProfile class.  Is this the > incorrect way to set this up?  I h

Re: Custom User Profiles + Signals

2011-03-02 Thread Jeremiah
I appreciate all of your feedback! My comments inserted within the message below: > What does cc.models.UserProfile looks like ? class UserProfile(models.Model): user = models.OneToOneField(User) thing = models.CharField(max_length=200) def __unicode__(self):

Re: Custom User Profiles + Signals

2011-03-02 Thread Wandering Weezard
I'll give that a shot. Thank you for your feedback. Still learning a lot as I go. On Tue, Mar 1, 2011 at 8:07 PM, Stefano wrote: > why you don't create the profile only if needed ? > > class UserProfile(models.Model): >user = models.ForeignKey(User, unique=True) > > User.profile = property(

Re: Custom User Profiles + Signals

2011-03-02 Thread bruno desthuilliers
On 2 mar, 00:50, Jeremiah wrote: > Hi All, > > So, if I do the following from the shell (as spawned by manage.py): > >>> import cc.models What does cc.models.UserProfile looks like ? > >>> from django.contrib.auth.models import User > >>> u = User.objects.get(username__exact="duh3") > >>> try: >

Re: Custom User Profiles + Signals

2011-03-01 Thread Stefano
why you don't create the profile only if needed ? class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) User.profile = property(lambda u: UserProfile.objects.get_or_create(user=u)[0]) 2011/3/2 Jeremiah : > Hi All, > > I'm going through the help document (http://docs.dj

Custom User Profiles + Signals

2011-03-01 Thread Jeremiah
Hi All, I'm going through the help document (http://docs.djangoproject.com/en/ 1.2/topics/auth/#storing-additional-information-about-users) and I'm starting to figure out how signals work. What I'm having problems with is getting my signal to trigger (or at least figuring out if the signal is act

Re: User Profiles?

2011-02-15 Thread william ratcliff
Thanks! On Wed, Feb 16, 2011 at 1:43 AM, Ian Clelland wrote: > > > user=User.objects.create_user(username=username,email=email,password=password) > >except django.db.utils.IntegrityError: > >print 'user exists' > >user=User.objects.get(username=username) > >user.firstname

Re: User Profiles?

2011-02-15 Thread Ian Clelland
> user=User.objects.create_user(username=username,email=email,password=password) >    except django.db.utils.IntegrityError: >        print 'user exists' >        user=User.objects.get(username=username) >    user.firstname=first_name >    user.lastname=last_name >    user.save() #make sure we have

User Profiles?

2011-02-15 Thread William Ratcliff
In Django, the standard way to add additional information to be associated with a user is to use a user profile. To do this, I have an app called, "accounts" accounts __init__.py models.py admin.py (we'll ignore this for now, it works fine) management __init__.py

Re: Editing user profiles via "inlines" breaks password management in admin site

2010-11-01 Thread derek
n 13 ?.?. 2010, at 17:19, Martin Burger wrote: > > > > > Hello, > > > > > I implemented a user profile that is activated via AUTH_PROFILE_MODULE > > > > in settings.py. In order to be able to view and edit user profiles in > > > > the admin

Re: Editing user profiles via "inlines" breaks password management in admin site

2010-10-27 Thread derek
: > > > > > On 13 ?.?. 2010, at 17:19, Martin Burger wrote: > > > > Hello, > > > > I implemented a user profile that is activated via AUTH_PROFILE_MODULE > > > in settings.py. In order to be able to view and edit user profiles in > > > th

Re: Editing user profiles via "inlines" breaks password management in admin site

2010-10-13 Thread Martin Burger
to be able to view and edit user profiles in > > the admin site, I used the method described at > >http://stackoverflow.com/questions/3400641/how-do-i-inline-edit-a-dja > > Basically, this method uses a custom ModelAdmin to enable inline > > editing. > > &g

Re: Editing user profiles via "inlines" breaks password management in admin site

2010-10-13 Thread Jonathan Barratt
On 13 ?.?. 2010, at 17:19, Martin Burger wrote: > Hello, > > I implemented a user profile that is activated via AUTH_PROFILE_MODULE > in settings.py. In order to be able to view and edit user profiles in > the admin site, I used the method described at > http://stackover

Editing user profiles via "inlines" breaks password management in admin site

2010-10-13 Thread Martin Burger
Hello, I implemented a user profile that is activated via AUTH_PROFILE_MODULE in settings.py. In order to be able to view and edit user profiles in the admin site, I used the method described at http://stackoverflow.com/questions/3400641/how-do-i-inline-edit-a-django-user-profile-in-the-admin

fixtures: loading user profiles with user data

2010-08-26 Thread oso_foo
My initial data for testing an app includes users, and I'm using user profiles. As the fixture for the app loads (while running "manage.py test"), I get "DatabaseError: no such table: userprofile_userprofile". This happens whether or not userprofile.userprofile data

Re: user profiles and the admin

2009-08-15 Thread consiglieri
;) > > regards, > > On Jul 28, 3:01 pm, Chris Curvey wrote: > > > > > I'm having a bit of a brain cramp here...I'm trying to add some extra > > fields to my user profiles, but I can't seem to get the fields to show > > up in the admin interface. I&#

Re: user profiles and the admin

2009-08-15 Thread Léon Dignòn
Hey Chris, have you found a solution? On Jul 29, 2:43 pm, Chris Curvey wrote: > Drat.  That's not it.  I'll keep trying. > > On Jul 28, 5:01 pm, Asinox wrote: > > > > > im new , but i think that u need this part: > > > class UserProfileAdmin(UserAdmin): > >     inlines = [UserProfileInline]

Re: user profiles and the admin

2009-07-29 Thread Chris Curvey
x27;) > > regards, > > On Jul 28, 3:01 pm, Chris Curvey wrote: > > > I'm having a bit of a brain cramp here...I'm trying to add some extra > > fields to my user profiles, but I can't seem to get the fields to show > > up in the admin interface. I've

Re: user profiles and the admin

2009-07-28 Thread Asinox
7;m trying to add some extra > fields to my user profiles, but I can't seem to get the fields to show > up in the admin interface. I've added the admin.py directory to my > application root, but the fields obstinately will not show up in the > admin interface. > > The

user profiles and the admin

2009-07-28 Thread Chris Curvey
I'm having a bit of a brain cramp here...I'm trying to add some extra fields to my user profiles, but I can't seem to get the fields to show up in the admin interface. I've added the admin.py directory to my application root, but the fields obstinately will not show up in

Re: Prefetch user profiles

2009-07-27 Thread Alex Gaynor
On Tue, Jul 28, 2009 at 1:19 AM, Andrew Fong wrote: > > Hi all, > > I'm using contrib.auth and have set up my own Profile model, linked to > the User model with OneToOneField. There are a lot of times when I'd > like to prefetch the Profile model when getting the User model -- e.g. > User.objects.

Prefetch user profiles

2009-07-27 Thread Andrew Fong
Hi all, I'm using contrib.auth and have set up my own Profile model, linked to the User model with OneToOneField. There are a lot of times when I'd like to prefetch the Profile model when getting the User model -- e.g. User.objects.all().select_related('profile') However, select_related does not

Re: User Profiles and Fixtures

2009-02-01 Thread stryderjzw
Well, it looks like I was able to solve this particular problem. In the fixtures, I changed the order when loading the data. I now load the Profile first, and then the User. That works. I guess writing the problem down helped me think of potential solutions. :P Still, I'm going to have to alte

User Profiles and Fixtures

2009-02-01 Thread stryderjzw
Hi! I did some searching, but I felt it's going nowhere, so here's the question. I'm using Django 1.1 r9756, the one where tests are using transactions. I have a user profile automatically created with signals, as below: def create_player(sender, instance=None, **kwargs): if instance i

Discussion board, user profiles and surveys

2008-11-14 Thread Fernando Rodriguez
Hi, I need to build a site that will mostly be a discussion board with surveys. What Django apps would you recommend for this? Thanks in advance, Fernando --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: question(s) about django-registration, default user profiles and django-profiles

2008-11-11 Thread Steve Holden
Alex S. wrote: > hi there, > > i want to use django-profiles to save some additional data for each > user. so i created the needed profile model and set it in my settings > file. after some looking over the standard user model i found fields > for first- and lastname. i need that data in my profil

Re: question(s) about django-registration, default user profiles and django-profiles

2008-11-11 Thread Alex S.
Thanks! regards Alex On 11 Nov., 16:16, Steve Holden <[EMAIL PROTECTED]> wrote: > Alex S. wrote: > > hi there, > > > i want to use django-profiles to save some additional data for each > > user. so i created the needed profile model and set it in my settings > > file. after some looking over the

question(s) about django-registration, default user profiles and django-profiles

2008-11-11 Thread Alex S.
hi there, i want to use django-profiles to save some additional data for each user. so i created the needed profile model and set it in my settings file. after some looking over the standard user model i found fields for first- and lastname. i need that data in my profiles and really would not li

Re: User Profiles "user.get_profile()" returns 'matching query does not exist.'

2008-09-20 Thread mclovin
That fixed it! I thought it automatically created and attached one which is why i was so confused. On Sep 20, 8:14 pm, Paddy Joy <[EMAIL PROTECTED]> wrote: > The error message is telling you that the user has no profile > (Specifically there is no record in the table schedule.profile related > to

Re: User Profiles "user.get_profile()" returns 'matching query does not exist.'

2008-09-20 Thread Paddy Joy
The error message is telling you that the user has no profile (Specifically there is no record in the table schedule.profile related to the user). Your app needs to take care of creating the user profile, even if it going to be empty. What I have done in my case is I force the user to create a pr

User Profiles "user.get_profile()" returns 'matching query does not exist.'

2008-09-20 Thread mclovin
I have spent about 2 hours on this so far, but havent been able to get it right, my model is: (located in schedule/models.py, stripped down to just the profile) from django.contrib.auth.models import User class profile(models.Model): user = models.ForeignKey(User, unique=True) aim = mode

Re: Portals, Subscriptions and User Profiles?

2007-11-12 Thread Marty Alchin
On 11/12/07, tunnel <[EMAIL PROTECTED]> wrote: > 2) There is a "modules" module, that seems in similar shape. Repository > hasn't much in it yet. > http://code.google.com/p/django-modular/ Django-modular > Does anyone else know of working code that can create > widgets/portlets/modules on a page?

Portals, Subscriptions and User Profiles?

2007-11-12 Thread tunnel
1) I have seen one subscription module, and it seems unfinished and dormant http://code.google.com/p/django-accounts/ http://code.google.com/p/django-accounts/ Is there any other "community portal" type solution around, with user profiles, and subscription levels, etc.? 2) There is

Multiple User profiles

2007-07-19 Thread Chris Hoeppner
Hi there! I just wanted to share opinions on this. I'm in the process of building a rather large site, that's going to expect quite some hits a day. So I want to to keep things as clean as possible. One never knows when I'll be getting my hands dirty again. The User(tm), can have a variable amou

Re: User Profiles and Save()

2007-07-09 Thread Chris Kelly
Ok. That's what I thought, but just wanted to make sure I wasn't missing something somewhere. Wasn't sure if this was a special case, as the AUTH_PROFILE_MODULE is used for get_profile, perhaps it was used to save/ sync the models. Thanks again! -C On Jul 9, 11:58 am, "James Bennett" <[EMAIL PR

Re: User Profiles and Save()

2007-07-09 Thread James Bennett
On 7/9/07, Chris Kelly <[EMAIL PROTECTED]> wrote: > Or do I have to manually manage saving both objects when making a > change? If so, what's the preferred way to do this? by managing the > profile via the user object, or by managing the user object via the > profile (overriding the profile save m

User Profiles and Save()

2007-07-09 Thread Chris Kelly
I am looking to attach a profile to the Django user object based on the b-list article, and had a question regarding saving models. Does/ should the profile be automatically saved at the same time the User model is saved? e.g. if I call a save on the user object, and i've got the AUTH_PROFILE_MOD

Re: Trouble with user profiles

2006-07-28 Thread Malcolm Tredinnick
On Fri, 2006-07-28 at 12:57 -0700, Akatemik wrote: > I got errors when user.get_profile returned None in my view. When > trying the same in manage.py shell, I noticed that get_model doesn't > find my profile model unless I have imported something from that > models.py > > $ python manage.py shell

Trouble with user profiles

2006-07-28 Thread Akatemik
I got errors when user.get_profile returned None in my view. When trying the same in manage.py shell, I noticed that get_model doesn't find my profile model unless I have imported something from that models.py $ python manage.py shell Python 2.3.5 (#2, Jun 13 2006, 23:12:55) [GCC 4.1.2 20060613 (