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
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
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
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.
&
> 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
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
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
> 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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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):
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(
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:
>
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
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
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
> 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
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
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
:
>
>
>
> > 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
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
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
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
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
;)
>
> 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
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]
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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?
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
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
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
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
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
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
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 (
59 matches
Mail list logo