User to UserProfile access problem

2017-08-09 Thread Mike Dewhirst
Using Django 1.10 Admin with a legacy contrib.auth.user plus 1:1 userprofile It works fine but I'm having trouble letting the user adjust their name and email address in contrib.auth.user. Additionally, I reveal some of the user profile fields as an Admin inline under the Company mode

Re: url and view for updating django userprofile

2017-06-10 Thread James Schneider
Here is the problem line in your view: return redirect('success:profile_accounts') You'll need to create an appropriate URL entry for your form submission redirect. -James On Jun 10, 2017 9:23 AM, "change i need" wrote: > Here is my model.py > > > # U

url and view for updating django userprofile

2017-06-10 Thread change i need
Here is my model.py # User profile model class UserProfile(models.Model): user = models.OneToOneField(User,unique=True,on_delete=models.CASCADE) bio = models.TextField(max_length=500,null=True,blank=True) picture = models.ImageField(upload_to="profile_image",null=True,blank=True

Integrating django-registration-redux along with custom_user: Prevent user registration if UserProfile is not valid

2016-10-20 Thread njan
r/register/$', RegistrationView.as_view(form_class = UserProfileForm), name = 'registration_register'), url(r'^user/', include('registration.backends.default.urls')), ] I have a UserProfile model as given below. (userprofile/models.py)

Re: UserProfile Pattern (extending User model); Migrations; New fields/columns on models.

2016-05-23 Thread Gergely Polonkai
Hello, did you run manage.py migrate? When you add a ForeignKey or OneToOne to a model, what actually gets stored in the DB is the ID of the referenced object (in this case, a auth.models.User). So the user_id column should be created for you during the next makemigrations+migrate combo. On a si

UserProfile Pattern (extending User model); Migrations; New fields/columns on models.

2016-05-23 Thread McKinley
I have a Users table inside of a postgresql database in which auth_user also lives. I want the Users objects to have a OneToOne to the auth_user model. I added a line to my models.py under my Users class: user = models.OneToOneField(User, unique=True) There are probably other things wrong, beca

Re: Allauth: Howto registrate User with also saving data UserProfile fields

2015-07-07 Thread Marco Neumann
:17:03 UTC+2 schreef Marco Neumann: > > Hi all, > > > I would like to make a registration form with the User SignUp form and > extra UserProfile fields. > > So after saving the user is created and the data is saved in the > UserProfile model. > > Can someone point m

Allauth: Howto registrate User with also saving data UserProfile fields

2015-07-07 Thread Marco Neumann
Hi all, I would like to make a registration form with the User SignUp form and extra UserProfile fields. So after saving the user is created and the data is saved in the UserProfile model. Can someone point me in the right direction. Thanks in advacend. Greetings Marco neumann -- You

Re: question about userprofile

2014-10-07 Thread Collin Anderson
> > But after that I don't understand how I can use the information in the > user table (like the pages that the user is allowed to enter) in django > and how to set it somewhere. And also since I should change the menu to > reflect that the user can go or not to one page how can I send this in

question about userprofile

2014-10-07 Thread Lorenzo Bernardi
Hello, I'd like to emphasize that it is probably a newbie question but I don't know what are the keyword I should use for googling. So any information would be helpful. I'm trying to add a userprofile to my django app. The idea is to use a sign-in system so that the us

Re: Image upload problem with UserProfile and my form

2014-08-04 Thread Collin Anderson
Set MEDIA_URL to '/media/' or something. Then add static() to your urls.py if you haven't. https://docs.djangoproject.com/en/dev/howto/static-files/#serving-files-uploaded-by-a-user-during-development -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Image upload problem with UserProfile and my form

2014-08-03 Thread Pepsodent Cola
t;Likes cheese: Favourite hamster name: Avatar: Currently: http://127.0.0.1:8000/accounts/profile/1406912993_56_tumblr_m5xo9h5X3E1qgfdhto1_500.gif>">1406912993_56_tumblr_m5xo9h5X3E1qgfdhto1_500.gif ClearChange: http://127.0.0.1:8000/static/userprofile/uploaded_files/>&quo

Re: Image upload problem with UserProfile and my form

2014-08-01 Thread Collin Anderson
This looks wrong to me: > > > so maybe, rearranging your code a bit: {% if form.avatar %} {% endif %} {{ form.avatar }} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Image upload problem with UserProfile and my form

2014-08-01 Thread Pepsodent Cola
s_%s" % (str(time()).replace('.','_'), filename) #_______ class UserProfile(models.Model): user = models.OneToOneField(User) nickname = models.CharField(max_length=50) likes_cheese = models.BooleanField(default=False)

Re: Django create userprofile

2014-05-12 Thread hito koto
Thank you ! I was should be set up unique=True 2014年5月12日月曜日 18時46分22秒 UTC+9 Erik Cederstrand: > > Den 12/05/2014 kl. 11.38 skrev hito koto >: > > > > Ok, Thank you! > > > > So, this is my the full codes; > > Are you sure your database is in sync with your model? The error message > implies

Re: Django create userprofile

2014-05-12 Thread Helton Alves
Reset your database and test again. 2014-05-12 10:46 GMT+01:00 Erik Cederstrand : > Den 12/05/2014 kl. 11.38 skrev hito koto : > > > Ok, Thank you! > > > > So, this is my the full codes; > > Are you sure your database is in sync with your model? The error message > implies that the field is defi

Re: Django create userprofile

2014-05-12 Thread Erik Cederstrand
Den 12/05/2014 kl. 11.38 skrev hito koto : > Ok, Thank you! > > So, this is my the full codes; Are you sure your database is in sync with your model? The error message implies that the field is defined with unique=True, but your model doesn't define it so: start_work = models.ForeignKey(Sta

Re: Django create userprofile

2014-05-12 Thread hito koto
This the error is came out when edited and saved 2014年5月12日月曜日 18時21分45秒 UTC+9 Erik Cederstrand: > > Den 12/05/2014 kl. 10.53 skrev hito koto >: > > > > Hi, > > > > i have this error , why ? > > > > > > (1062, "Duplicate entry '1' for key 'start_work_id'") > > Exception Type:Integ

Re: Django create userprofile

2014-05-12 Thread hito koto
Ok, Thank you! So, this is my the full codes; class Staff(models.Model): user = models.OneToOneField(User) user_name = models.CharField(max_length=255,) first_kana = models.CharField(max_length=255,) last_kana = models.CharField(max_length=255, ) employee_number = models.Cha

Re: Django create userprofile

2014-05-12 Thread Erik Cederstrand
Den 12/05/2014 kl. 10.53 skrev hito koto : > Hi, > > i have this error , why ? > > > (1062, "Duplicate entry '1' for key 'start_work_id'") > Exception Type: IntegrityError > Exception Value: > (1062, "Duplicate entry '1' for key 'start_work_id'" Please post your code for the model

Django create userprofile

2014-05-12 Thread hito koto
Hi, i have this error , why ? (1062, "Duplicate entry '1' for key 'start_work_id'") Exception Type: IntegrityError Exception Value: (1062, "Duplicate entry '1' for key 'start_work_id'" -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: how to automatically create userprofile when user is created from admin

2013-03-09 Thread Atul Bhouraskar
On Saturday, 9 March 2013 04:56:52 UTC+11, frocco wrote: > > Hello, > > right now, if I create a user in admin, I have to also create their > userprofile that I have defined in settings. > > Is there a way to automate this? > > Thanks > > > Hi, If by automat

Re: how to automatically create userprofile when user is created from admin

2013-03-08 Thread Shawn Milochik
Yes. Use a post-save signal. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to djan

how to automatically create userprofile when user is created from admin

2013-03-08 Thread frocco
Hello, right now, if I create a user in admin, I have to also create their userprofile that I have defined in settings. Is there a way to automate this? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Userprofile, signal and admin inline edit.

2012-11-29 Thread Daniel Gerzo
t; 2) post_save on User is triggered, and User's profile is created > 3) Django admin saves the UserProfile... but it already exists, and an > integrity error is raised > > > I'm currently looking into a solution to this as well, and will let > you know what I fin

Re: Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
t;> all partners, how do I have to set is_admin differently for every partner? >> >> class UserProfile(models.Model): >> partners = models.ManyToManyField('partners.Partner', null = True, >> blank = True) >> user = models.OneToOneField(User

Re: Extend Django UserProfile

2012-11-01 Thread Nicolas Emiliani
ne one or more admin >> user for every partner. >> >> This is my accounts/models.py. In this case is_admin is set globally for >> all partners, how do I have to set is_admin differently for every partner? >> >> class UserProfile(models.Model): >> par

Re: Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
unts/models.py. In this case is_admin is set globally for > all partners, how do I have to set is_admin differently for every partner? > > class UserProfile(models.Model): > partners = models.ManyToManyField('partners.Partner', null = True, > blank = True) >

Re: Extend Django UserProfile

2012-11-01 Thread Nicolas Emiliani
case is_admin is set globally for > all partners, how do I have to set is_admin differently for every partner? > > class UserProfile(models.Model): > partners = models.ManyToManyField('partners.Partner', null = True, > blank = True) > user = models.OneToOneField(Us

Extend Django UserProfile

2012-11-01 Thread Zoltán Bege
admin differently for every partner? class UserProfile(models.Model): partners = models.ManyToManyField('partners.Partner', null = True, blank = True) user = models.OneToOneField(User) is_admin = models.BooleanField(default = False) def __unicode__(self): retur

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 19:06, DF wrote: > django.db.utils.DatabaseError: relation "report_userprofile" does not exist > LINE 1: INSERT INTO "report_userprofile" ("user_id", "first_name", "... > [ ... ] > This is the database m

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread DF
(sender, instance, signal, created, **kwargs): """When user is created also create a matching profile.""" from stentorian.report.models import UserProfile if created: UserProfile(user = instance).save() On Thursday, July 5, 2012 1:06:26 PM UTC-4,

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread m1chael
", "... > > Apparently, it did not create DB tables for the UserProfile model. I’m now > getting this exception when I attempt to run the server: > > xception Type: DoesNotExist at /accounts/login/ > Exception Value: Site matching query does not exist. > > Among the addit

Converting to Postgres database; error with UserProfile model

2012-07-05 Thread DF
syncdb: django.db.utils.DatabaseError: relation "report_userprofile" does not exist LINE 1: INSERT INTO "report_userprofile" ("user_id", "first_name", "... Apparently, it did not create DB tables for the UserProfile model. I’m now getting this exception whe

Re: SimpleListFilter filter UserProfile

2012-06-30 Thread Sunny Nanda
In the filter, you are trying the filter User objects on timestamp field which does not exist. In line 42 of admin.py, try filtering on "userprofile__timestamp__gte" -Sandeep On Thursday, June 28, 2012 1:20:03 PM UTC+5:30, yillkid wrote: > > Hi all ! > > I want filter

SimpleListFilter filter UserProfile

2012-06-28 Thread yillkid
Hi all ! I want filter a field of UserProfile (field name: timestamp), models.py: http://dpaste.com/764723/ admin.py: http://dpaste.com/764724/ But when I press the filter, browser show: http://dpaste.com/764725/ --- --- --- --- --- --- --- --- --- --- According the error message, I

Does UserProfile any changed in new version ?

2012-06-25 Thread yillkid
Hi all ! When I use UserProfile/UserCreationForm in Django 1.1, everything is OK! But in Django 1.4, seems I can not hook my User Profile in Django User model, when my UserProfile register into admin.site, I need reload the browser 2nd times or error message will be show: http

Add UserProfile Inline in the change_View function

2012-05-09 Thread bvcelari
User model) and their Profile information, but allow Admin user to access all the info. My UserProfile model like this: ##models.py ##my smple profile class UserProfile(models.Model): user=models.OneToOneField(User) extra_field=models.Charfield(max_length=100,blank=True) My admin: ##admin.py

Re: User/UserProfile Queryset problem

2012-03-27 Thread bcrem
Oh. I see. So...that wasn't very complicated at all then, was it? Thanks DR - didn't realize you could access userprofile directly from user that way. On Mar 27, 2:31 am, Daniel Roseman wrote: > On Tuesday, 27 March 2012 02:15:04 UTC+1, bcrem wrote: > > > Hello Django

Re: User/UserProfile Queryset problem

2012-03-26 Thread Daniel Roseman
user profile class associated with each user, > UserProfile, accessible through the usual User.get_profile() > 3. UserProfile has a status variable, UserProfile.status, which can > be 'Active', 'Inactive', or 'Deleted' > > I'm trying to display

User/UserProfile Queryset problem

2012-03-26 Thread bcrem
Hello Django Nerds! So I have a (somewhat) complicated lookup I'm trying to do; here's the gist of it: 1. I have a Store class, with a User ManyToManyField, Store.users 2. I have a user profile class associated with each user, UserProfile, accessible through the usual User.g

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Thanks tom, that worked and now understand what i was doing wrong. much appreciated. On Feb 24, 7:08 am, Tom Evans wrote: > On Fri, Feb 24, 2012 at 2:55 PM, richard wrote: > > Hi Tom, > > > Thanks for your reply. So for clarity i thought i was getting the > > user

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread Tom Evans
On Fri, Feb 24, 2012 at 2:55 PM, richard wrote: > Hi Tom, > > Thanks for your reply. So for clarity i thought i was getting the > userprofile to pass into the bound form so that the userprofile_id in > the UserProfilePic would get populated/saved. as if i leave the > instance as

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Hi Tom, Thanks for your reply. So for clarity i thought i was getting the userprofile to pass into the bound form so that the userprofile_id in the UserProfilePic would get populated/saved. as if i leave the instance as None then i get an error saying that userprofile_id cannot be empty? also, is

Re: help needed with multiple profile images with UserProfile

2012-02-24 Thread Tom Evans
= UserProfilePic >        fields = ('profilepic',) > > […] > >    form = UserProfilePicForm(instance=u.get_profile()) u.get_profile() returns a UserProfile. Your form definition says that this form is for a UserProfilePic model. Cheers Tom -- You received this message beca

help needed with multiple profile images with UserProfile

2012-02-24 Thread richard
Hi, Am i doing this in the correct way? I am trying to accomplish a UserProfile having multiple profile images. IE if a user uploads a profile photo it gets saved as the default profile pic but if they upload another pic then that becomes the default pic but i need to keep records of all the

Re: is my UserProfile ManyToMany wrong?

2012-02-12 Thread richard
Sun, Feb 12, 2012 at 6:06 AM, richard wrote: > > Hi im having difficulty looping over my mantomany in my template. A > > user has a 1to1 with UserProfile and the UserProfile has a manytomany > > with interests. But displaying the form field without looping over it > >

Re: is my UserProfile ManyToMany wrong?

2012-02-12 Thread Daniel Roseman
On Sunday, 12 February 2012 11:06:32 UTC, richard wrote: > > Hi im having difficulty looping over my mantomany in my template. A > user has a 1to1 with UserProfile and the UserProfile has a manytomany > with interests. But displaying the form field without looping over it > d

Re: is my UserProfile ManyToMany wrong?

2012-02-12 Thread Patrick Wellever
ck On Sun, Feb 12, 2012 at 6:06 AM, richard wrote: > Hi im having difficulty looping over my mantomany in my template. A > user has a 1to1 with UserProfile and the UserProfile has a manytomany > with interests. But displaying the form field without looping over it > displays a mode

is my UserProfile ManyToMany wrong?

2012-02-12 Thread richard
Hi im having difficulty looping over my mantomany in my template. A user has a 1to1 with UserProfile and the UserProfile has a manytomany with interests. But displaying the form field without looping over it displays a model multiple select with just a list of object result sets. displaying

Re: syncdb doesn't create UserProfile table

2011-06-21 Thread Kenneth Gonsalves
On Tue, 2011-06-21 at 12:49 +0100, Tom Evans wrote: > >> It will still work perfectly with ForeignKey(unique=True), > > > > the docs say one2one > > > > That doesn't negate my statement. > > You said that User.get_profile() will only work with OneToOneField, > which is incorrect, it will also wor

Re: syncdb doesn't create UserProfile table

2011-06-21 Thread Tom Evans
On Sat, Jun 18, 2011 at 8:27 AM, Kenneth Gonsalves wrote: > On Thu, 2011-06-16 at 12:13 +0100, Tom Evans wrote: >> On Thu, Jun 16, 2011 at 11:55 AM, Kenneth Gonsalves >> wrote: >> > those entries are old. The point is that the built in >> User.get_profile() >> > only works with onetoone. The diff

Re: syncdb doesn't create UserProfile table

2011-06-18 Thread Kenneth Gonsalves
On Thu, 2011-06-16 at 12:13 +0100, Tom Evans wrote: > On Thu, Jun 16, 2011 at 11:55 AM, Kenneth Gonsalves > wrote: > > those entries are old. The point is that the built in > User.get_profile() > > only works with onetoone. The difference is in the reverse lookup. > > That is not correct. > > It

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Tom Evans
On Thu, Jun 16, 2011 at 11:55 AM, Kenneth Gonsalves wrote: > those entries are old. The point is that the built in User.get_profile() > only works with onetoone. The difference is in the reverse lookup. That is not correct. It will still work perfectly with ForeignKey(unique=True), it is just be

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Kenneth Gonsalves
On Thu, 2011-06-16 at 12:24 +0200, Ivo Brodien wrote: > This Django Book however is old and in the new one in Chapter 14: > Sessions, Users, and Registration the User Profile does not get > mentioned anymore. > > Also the first search result in google for “django user profile” is > James Bennetts

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Ivo Brodien
> In the paragraph preceding this link it explicitly states to use > OneToOneField. The Django documentation is canonical, if it says one > thing, and elsewhere on the internet says something else, the internet > is wrong. The internet is often wrong. > > The difference between a ForeignKey(unique

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Tom Evans
On Thu, Jun 16, 2011 at 11:24 AM, Ivo Brodien wrote: > > Actually, I've read that ForeignKey is now the way to specify it. > > unique foreign key *was* the correct way as onetoone was broken. This is > no longer true. > > where is the most up to date info on this? > In the dev docs about storing a

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Ivo Brodien
>> Actually, I've read that ForeignKey is now the way to specify it. > > unique foreign key *was* the correct way as onetoone was broken. This is > no longer true. where is the most up to date info on this? In the dev docs about storing additional user info on djangoproject.com there is a lin

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Benedict Verheyen
On 16/06/2011 11:29, Kenneth Gonsalves wrote: > On Thu, 2011-06-16 at 11:10 +0200, Benedict Verheyen wrote: >> On 16/06/2011 10:43, Kenneth Gonsalves wrote: >>> On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: user = models.ForeignKey(User, unique=True) >>> >>> you need onetoone for

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Kenneth Gonsalves
On Thu, 2011-06-16 at 11:10 +0200, Benedict Verheyen wrote: > On 16/06/2011 10:43, Kenneth Gonsalves wrote: > > On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: > >> user = models.ForeignKey(User, unique=True) > > > > you need onetoone for this to work. > > Hi, > > Actually, I've read

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Benedict Verheyen
On 16/06/2011 10:43, Kenneth Gonsalves wrote: > On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: >> user = models.ForeignKey(User, unique=True) > > you need onetoone for this to work. Hi, Actually, I've read that ForeignKey is now the way to specify it. Anyway, the problem has been so

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Benedict Verheyen
On 16/06/2011 10:27, Ivo Brodien wrote: > an idea: Do you have a __init__.py in every subfolder? also the models and > userprofile folder under calltracking_main ? > > Ivo, i do have an __init__.py in every folder. As Jari pointed out, it was the appname in my UserProfile mo

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Benedict Verheyen
On 16/06/2011 10:25, Jani Tiainen wrote: > On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: >> Hi, >> >> >> The syncdb command doesn't want to create the UserProfile table. >> Also when I was trying to get this working while runnin

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Kenneth Gonsalves
On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: > user = models.ForeignKey(User, unique=True) you need onetoone for this to work. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to th

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Ivo Brodien
an idea: Do you have a __init__.py in every subfolder? also the models and userprofile folder under calltracking_main ? On Jun 16, 2011, at 10:10 AM, Benedict Verheyen wrote: > Hi, > > > The syncdb command doesn't want to create the UserProfile table. > Also when I wa

Re: syncdb doesn't create UserProfile table

2011-06-16 Thread Jani Tiainen
On Thu, 2011-06-16 at 10:10 +0200, Benedict Verheyen wrote: > Hi, > > > The syncdb command doesn't want to create the UserProfile table. > Also when I was trying to get this working while running the app, > it was complaining about AUTH_PROFILE_MODULE. > It is however

syncdb doesn't create UserProfile table

2011-06-16 Thread Benedict Verheyen
Hi, The syncdb command doesn't want to create the UserProfile table. Also when I was trying to get this working while running the app, it was complaining about AUTH_PROFILE_MODULE. It is however correctly specified in my settings.py: ... AUTH_PROFILE_MODULE = 'calltracking_main.U

Re: Userprofile, signal and admin inline edit.

2011-06-14 Thread Jon Biddle
The issue seems to come from the fact that the order of operations when you create the user looks like this: 1) Django admin saves the new User 2) post_save on User is triggered, and User's profile is created 3) Django admin saves the UserProfile... but it already exists, and an integrity

Re: Multiple UserProfile

2011-06-11 Thread Ignacio Soto
Ok, kenneth i havent seen it that way. I will use your model. I really apreciate it Thanks ignacio Soto Reveco Staff IngeHost El 12-06-2011 0:39, "Kenneth Gonsalves" escribió: On Sat, 2011-06-11 at 21:12 -0400, Ignacio Soto wrote: > No, the same person cant be costumer and se... I have a bas

Re: Multiple UserProfile

2011-06-11 Thread Kenneth Gonsalves
On Sat, 2011-06-11 at 21:12 -0400, Ignacio Soto wrote: > No, the same person cant be costumer and seller. I have a basic profile with information common to both customer and seller called Person and separate models called customer and seller with foreign key to person. Thus one person may have mul

Re: Multiple UserProfile

2011-06-11 Thread Venkatraman S
On Sun, Jun 12, 2011 at 6:42 AM, Ignacio Soto wrote: > No, the same person cant be costumer and seller. > Then why not have a 'type' in your profile which tracks the user type? -V http://blizzardzblogs.blogspot.com/ -- You received this message because you are subscribed to the Google Groups

Re: Multiple UserProfile

2011-06-11 Thread Ignacio Soto
No, the same person cant be costumer and seller. ignacio Soto Reveco Staff IngeHost El 11-06-2011 21:37, "Kenneth Gonsalves" escribió: On Fri, 2011-06-10 at 23:51 -0400, Ignacio Soto wrote: > i want to create 2 user profile: cutomer an... can the same person be both customer and seller? -- rega

Re: Multiple UserProfile

2011-06-11 Thread Kenneth Gonsalves
On Fri, 2011-06-10 at 23:51 -0400, Ignacio Soto wrote: > i want to create 2 user profile: cutomer and seller with diferents > fields > and quantity of fields can the same person be both customer and seller? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.or

Re: Multiple UserProfile

2011-06-11 Thread Ignacio Soto
Ok, thannks i will try, and let you know... Cheers ignacio Soto Reveco Staff IngeHost El 11-06-2011 11:41, "Shawn Milochik" escribió: Oops, correction: You'd use user.seller_profile and user.customer_profile if you've set it up as a OneToOneField -- the get() is unnecessary (and won't work).

Re: Multiple UserProfile

2011-06-11 Thread Shawn Milochik
Oops, correction: You'd use user.seller_profile and user.customer_profile if you've set it up as a OneToOneField -- the get() is unnecessary (and won't work). You'd use get() if you used a ForeignKey with unique = True, but that's silly because a OneToOneField does exactly that but more explici

Re: Multiple UserProfile

2011-06-11 Thread Shawn Milochik
Just make your models for the customer and seller profiles, and attach them to users with a OneToOne field. You can only specify one to be used with User.get_profile(), but I've learned from discussions among core developers that get_profile() is something many consider useless. It's even been

Multiple UserProfile

2011-06-11 Thread Ignacio Soto
Hi there... i want to create 2 user profile: cutomer and seller with diferents fields and quantity of fields but there is a problem with Get_Profile() i've reading about it and i found some inheritance hacks.. but i doubt it was the good way? what is the right way to do it? thanks -- __ Ignac

Re: Django - UserProfile m2m field in admin - error

2011-05-29 Thread Ryan
I can confirm that I get the same error. I wonder if it is anything to do with the two different forms auth uses for user creation and change? On a side note, how did you get your code so nicely formatted? Ryan -- You received this message because you are subscribed to the Google Groups "Dj

Re: Userprofile, signal and admin inline edit.

2011-05-26 Thread Malcolm Box
On 26 May 2011 10:23, Jani Tiainen wrote: > If I extend auth.User with custom profile and add automatic profile > creation signal it works as expected. > > But if I try to add admin inline editor for profile when saving I get > exception about integration violation. > > It happens because admin t

Userprofile, signal and admin inline edit.

2011-05-26 Thread Jani Tiainen
If I extend auth.User with custom profile and add automatic profile creation signal it works as expected. But if I try to add admin inline editor for profile when saving I get exception about integration violation. It happens because admin tries to create second profile for user when saving. I

blank=True, null=True dont work with UserProfile

2011-04-30 Thread Daniel Corbe
Hello friends, I have the following models, the problem is that the fields null = True and blank = True, are being validated when they should enter zero plumb, can someone help me? class UserProfile(models.Model): sexo = models.CharField(choices=(("masculino","masculi

Re: Error installing permissions superuser when a userprofile has been defined

2011-03-23 Thread Jason Culverhouse
On Mar 23, 2011, at 4:25 AM, Malcolm Box wrote: > Further investigation: looks like it's a South/syncdb interaction. The > UserProfile will be created by the south migration, but of course that > hasn't run when the auth post_install runs to prompt for a superuser. > &g

Re: Error installing permissions superuser when a userprofile has been defined

2011-03-23 Thread Malcolm Box
Further investigation: looks like it's a South/syncdb interaction. The UserProfile will be created by the south migration, but of course that hasn't run when the auth post_install runs to prompt for a superuser. Sadly syncdb --migrate doesn't do the right thing either. For now, I&

Error installing permissions superuser when a userprofile has been defined

2011-03-23 Thread Malcolm Box
and answer yes. But when the user is created, I get a django.db.utils.DatabaseError: (1146, "Table 'x.x_userprofile' doesn't exist"), because the userprofile table from my app hasn't been created yet. This must be a common problem, but I can't find a recommen

Edit profile with ModelForm and UserProfile

2011-02-21 Thread galago
I use extended UserProfile. Now I want to make a profile edition. I need to place all my custom profile fields and email, firstname, lastname from original User model. I try to do this, but can't make it work. Email field is not shown. None of the User model are shown. My forms:

Re: UserProfile

2010-10-13 Thread Ted
request.user.get_profile().avatar_url Assuming you have set a AUTH_PROFILE_MODULE in settings, and send the request context when rendering. On Oct 13, 5:19 am, reduxdj wrote: > I have a simple use-case. I want the user's profile to be available to > the context instance. For instance, the user's

Re: UserProfile

2010-10-13 Thread Detectedstealth
Take a look at my site: http://www.wcfree.com you will have to register etc but once you are done let me know if that is what you are looking for with user profiles and having the image available etc... If so I can help you. PS: Make sure to email me your username after you are finished so i can r

Re: UserProfile

2010-10-13 Thread Daniel Roseman
On Oct 13, 1:19 pm, reduxdj wrote: > I have a simple use-case. I want the user's profile to be available to > the context instance. For instance, the user's avatar image, i want > them to be able to see it all the time. Is there way to make the user > profile available to the context instance? > >

UserProfile

2010-10-13 Thread reduxdj
I have a simple use-case. I want the user's profile to be available to the context instance. For instance, the user's avatar image, i want them to be able to see it all the time. Is there way to make the user profile available to the context instance? Thanks, Patrick -- You received this message

Re: Best practice for auth.User/UserProfile division?

2010-08-23 Thread Steve Holden
On 8/23/2010 1:52 AM, adambossy wrote: > I'm helping build a social networking site which makes heavy use of > django built-in User model and its relationship to other Users on the > site. We created a UserProfile per the django documentation [http:// > docs.djangoproject.com/e

Best practice for auth.User/UserProfile division?

2010-08-22 Thread adambossy
I'm helping build a social networking site which makes heavy use of django built-in User model and its relationship to other Users on the site. We created a UserProfile per the django documentation [http:// docs.djangoproject.com/en/dev/topics/auth/#storing-additional- information-about-

Creating a many-to-many link for a UserProfile?

2010-06-29 Thread derek
Django 1.2.1, with Python 2.6 I am trying to establish a many-to-many for a userprofile (working with a legacy database so some of the field names are a little strange...). The models I have are: class UserGrouping(models.Model): #many-to-many id = models.AutoField(primary_key=True

Re: Integrity Error with trying to save UserProfile automatically

2010-06-02 Thread kalinski
linsko On Jun 2, 8:34 pm, kalinski wrote: > Hi Djangos, > > i am attaching a UserProfile to my Users > by using a post_save signal: > > class UserProfile(models.Model): >     user = models.ForeignKey(User, unique=True) >     address = models.ForeignKey(Address, blank=True, n

Integrity Error with trying to save UserProfile automatically

2010-06-02 Thread kalinski
Hi Djangos, i am attaching a UserProfile to my Users by using a post_save signal: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) address = models.ForeignKey(Address, blank=True, null=True) def user_post_save(sender, instance, signal, *args, **kwargs

Problem with editing UserProfile through the admin interface.

2010-05-21 Thread Anatoliy Guts
Hello. I have problem with editing UserProfile through the admin interface. I have such classes: class UserProfile(models.Model): user = models.OneToOneField(User) credits = models.PositiveIntegerField() class ModelProfile(UserProfile): description = models.CharField(_('descri

Re: to_field connected to field in UserProfile

2010-03-01 Thread django_is
Thank you for your comment. Well I need the following possibilities: - Possibility to add payment methods in the admin without being fixed to several choices - Possibility to say: Customer 1 has payment methods: PayPal, CreditCard Customer 2 has payment methods: PayPal etc. So the ability to hav

Re: to_field connected to field in UserProfile

2010-02-28 Thread Timothy Kinney
I don't see much reason to keep Payment method separate from the Orders class then. For each order, you can have a different payment method, so just make a payment method column in the Orders model. Like this: payment_method_choices = ( ('$$', 'Cash'), ('cc', 'Credit Card'), ) class Order

Re: to_field connected to field in UserProfile

2010-02-27 Thread django_is
Yeah I understand that. But it makes no sense to link the payment field in my Orders model to the CustomerProfile. In the end I want to save one payment method from the methods that are available for one specific user in my record for one order. I'm just confused on how to achieve that. From a user

Re: to_field connected to field in UserProfile

2010-02-24 Thread Timothy Kinney
When you include the to_field, it tells Django that you want the foreignkey to be the to_field on the CustomerProfile. It then looks for a field called payment_id (following the foreignKey relationship). This is normal. If you remove the to_field, it will choose the primary key of CustomerProfile

Re: to_field connected to field in UserProfile

2010-02-23 Thread django_is
Thank you for your response. But how would the Orders model field for payment look like? Should it look like that: payment = models.ForeignKey(CustomerProfile, related_name="order_customer_payment",verbose_name='Zahlungsart') I don't understand how that should work. At the moment I am quite conf

  1   2   >