Re: user profile in Django

2021-06-28 Thread Kelvin Sajere
; On Sunday, 27 June 2021 at 21:46:28 UTC suabiut wrote: > >> You can use the user model, do something like that >> >> class user_register(models.Model): >> user = models.OneToOneField(User,on_delete=models.CASCADE) >> join_date = models.DateTimeField(def

Re: user profile in Django

2021-06-28 Thread Abdoulaye Koumaré
use the user model, do something like that > > class user_register(models.Model): > user = models.OneToOneField(User,on_delete=models.CASCADE) > join_date = models.DateTimeField(default=timezone.now) > > To view the user profile, you can do something like this. > &g

Re: user profile in Django

2021-06-27 Thread sum abiut
You can use the user model, do something like that class user_register(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) join_date = models.DateTimeField(default=timezone.now) To view the user profile, you can do something like this. def user_profile(request

user profile in Django

2021-06-27 Thread Samir Areh
Hello I'm new to django. i want to create a user profile. I want to know the best way to do this. thanks -- 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, se

reg: error after I update my user profile page successfully

2020-07-29 Thread 'Amitesh Sahay' via Django users
the method: @login_required(login_url="/login/") def editUserProfile(request): if request.method == "POST": form = UserProfileUpdateForm(request.POST, instance=request.user) # default user profile update obj = UserProfile.objects.get(user__id=request.us

Re: help on creating user profile using drf

2020-07-28 Thread ola neat
sorry this didnt work, when i try this if created: instance.profile = Profile.objects.create(user=instance) instance.save() i couldnt even register any user On Mon, Jul 27, 2020 at 2:24 AM Fernando Hernandez wrote: > I think the issue is here instance.profile will be None first time the

Re: help on creating user profile using drf

2020-07-26 Thread Fernando Hernandez
I think the issue is here instance.profile will be None first time the CustomUser is created, you need to assign the created Profile to the instance and then save the user [image: image.png] try this if created: instance.profile = Profile.objects.create(user=instance) instance.save() On

Re: Django user profile shared among different apps

2019-06-05 Thread Chetan Ganji
Gaurav Sahu wrote: > Hy Everyone, > I have a Django website which has multiple apps one of the apps is > accounts app. accounts app is responsible for user sign up and > authentication. Now I want to create a user profile in my website and that > user will be the same across all of m

Django user profile shared among different apps

2019-06-05 Thread Gaurav Sahu
Hy Everyone, I have a Django website which has multiple apps one of the apps is accounts app. accounts app is responsible for user sign up and authentication. Now I want to create a user profile in my website and that user will be the same across all of my web apps. how can I implement this

Re: User profile

2019-01-17 Thread senthu nithy
Thank you ANi and Alex. I will refer both links K.Senthuja Undergraduate Student (UOJ), https://www.linkedin.com/in/senthuja/ https://medium.com/@senthujakarunanithy On Thu, Jan 17, 2019 at 8:41 PM Alex Kimeu wrote: > First you need to create a model for the User Profile. > > On Th

Re: User profile

2019-01-17 Thread Alex Kimeu
First you need to create a model for the User Profile. On Thu, 17 Jan 2019, 17:49 ANi Do you mean you want to create your custom user model? > Two ways to do it, > 1. create a profile model and use foreign key to the user model that > Django provided. > 2. create a custom user mod

Re: User profile

2019-01-17 Thread ANi
47分41秒寫道: > > I am new Django framework. I want to create a user profile for my app. But > i start to create the user profile then i direct to create Admin profile > which is already created in Django. I want to create a user Profile. Can > you direct me? > -- You received th

User profile

2019-01-17 Thread senthu nithy
I am new Django framework. I want to create a user profile for my app. But i start to create the user profile then i direct to create Admin profile which is already created in Django. I want to create a user Profile. Can you direct me? -- You received this message because you are subscribed

Re: view user profile access restriction

2018-01-29 Thread sum abiut
Thanks heaps , I noticed that. On 29/01/2018 8:28 PM, "Daniel Roseman" wrote: On Monday, 29 January 2018 05:57:55 UTC, suabiut wrote: > > I manage to fixed it. I have created two instances (profile_info and info) > in my view, i use the first instance to access the information from my > Profile

Re: view user profile access restriction

2018-01-29 Thread Daniel Roseman
On Monday, 29 January 2018 05:57:55 UTC, suabiut wrote: > > I manage to fixed it. I have created two instances (profile_info and info) > in my view, i use the first instance to access the information from my > Profile model and the second instance to access th User model. I also set > the *AUTH_

Re: view user profile access restriction

2018-01-28 Thread sum abiut
t; post_save.connect(create_profile, sender=User) > > > > > > > > > > On Mon, Jan 29, 2018 at 1:02 PM, Dylan Reinhold > wrote: > >> There are a bunch of ways to do it. >> Show us your view, if it's a function based view, just do your select on &g

Re: view user profile access restriction

2018-01-28 Thread sum abiut
nction based view, just do your select on > (username=request.user) > > Dylan > > On Sun, Jan 28, 2018 at 4:59 PM, sum abiut wrote: > >> Hi, >> i have a django app that i want the users to be able to view only their >> user profile once they have login. currently an

Re: view user profile access restriction

2018-01-28 Thread Dylan Reinhold
There are a bunch of ways to do it. Show us your view, if it's a function based view, just do your select on (username=request.user) Dylan On Sun, Jan 28, 2018 at 4:59 PM, sum abiut wrote: > Hi, > i have a django app that i want the users to be able to view only their > user pro

view user profile access restriction

2018-01-28 Thread sum abiut
Hi, i have a django app that i want the users to be able to view only their user profile once they have login. currently any user that login is able to view other users profile as well. Appreciate is you could point me to the right direction. cheers, -- You received this message because you are

Re: Django create user profile at the time of registration from submission

2017-04-22 Thread ludovic coues
You are only posting a little part of the error. It would be a lot easier to help you if you posted the whole error 2017-04-22 12:17 GMT+02:00 Neutron's dfgsdgsd : > I am working on a Role Based Access Control system on django.where at the > signup/register people will be designated to a 'departme

Django create user profile at the time of registration from submission

2017-04-22 Thread Neutron's dfgsdgsd
I am working on a Role Based Access Control system on django.where at the signup/register people will be designated to a 'department' and will be assigned a 'role' Hence I created a custom user model models.py from django.db import models from django.contrib.auth.models import User

Trying to extend the User model to create a user profile page

2016-04-26 Thread Patrick Harding
I am creating an app for our company to have users log in, create a profile page, and create updates on some personal progress. I have handled logging in and registering with django-registration, and have created the app for updates, but i'm not able to create a profile page extending the user's

Re: Different user profile associated to a each user group

2015-03-12 Thread Collin Anderson
Hi, I'd personally recommend re-using the same model and having a "type" field for whether it's corporate or private. Otherwise, you'd need to do something like: class Corporate(models.Model): user = models.OneToOneField(User) class Private(models.Model): user = models.OneToOneField(Us

Different user profile associated to a each user group

2015-03-11 Thread Alessandro Pasotti
Hi, I've used custom user profiles in the past, but they were associated to all users, now I need to associate a different custom profile for each user group (for example: "corporate", "private"). Any hint about the best approach? -- Alessandro Pasotti w3: www.itopen.it -- You received this

Re: Django(1.7) admin - separate user-profile section

2015-03-06 Thread Collin Anderson
Hi, If you just add a custom __str__ (or __unicode__ on py2) it might do what you want. def __str__(self): return str(user) Otherwise, in UserTokenAdmin, set list_display = ['user'] Collin On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Flemming Hansen wrote: > > Hi all, > > I need to ma

Django(1.7) admin - separate user-profile section

2015-03-04 Thread Flemming Hansen
Hi all, I need to make a `passwordless` token system, and want to have a "Home › Passwordless › User tokens" in the Admin section. For the "User tokens" `list_display` I need all the "Users". (I do _not_ want to display the token information on the regular "User"-admin as just an extended "pro

Re: dashboard for user profile

2015-01-04 Thread Fabio Caritas Barrionuevo da Luz
Em sexta-feira, 13 de julho de 2012 09h14min21s UTC-3, psychok7 escreveu: > > yes i understand that, but i am asking if there is a pluggable app that > does that for us with some jquery and stuff. > > as i said theres is django-profiles, but i think its poorly documented and > i am not able to

Re: dashboard for user profile

2015-01-04 Thread Derek
his? > > On Friday, 13 July 2012 03:57:45 UTC+2, psychok7 wrote: >> >> i there, >> i am trying to write a dashboard page to present after user login. i have >> been searching google and only found *django-admin-tools . won*dering if >> there is something like tha

Re: dashboard for user profile

2015-01-03 Thread Aaron Reabow
like that for a user profile page (tried django-profiles > with no luck) > > thanks > -- 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 djan

Re: Update user and user profile same form

2014-06-29 Thread Andrew Choi
Henrique, It looks like what you're looking for is a formset: https://docs.djangoproject.com/en/1.6/topics/forms/formsets/ Andrew On Saturday, June 28, 2014 11:28:35 PM UTC+9, Henrique Oliveira wrote: > > Hi Guys, > > I have this model: > > class Member(models.Model): > user = models.OneToO

Update user and user profile same form

2014-06-28 Thread Henrique Oliveira
Hi Guys, I have this model: class Member(models.Model): user = models.OneToOneField(User, primary_key=True) date_of_birth = models.DateField('Date of Birth') class Meta: db_table = 'member' def member_email(self): return self.user.email def first_name(self):

Re: get user profile info in templates

2014-04-24 Thread Ramón Carrillo
want get user profile information in templates who is logged in. > try everypossible solution but didn't achieve anything > > this is my profile models code below: > > from django.db import models > from django.utils.translation import ugettext_lazy as _ > > from C

get user profile info in templates

2014-04-24 Thread sourav
hi i am a newbie in django i am creating an app with customuser and profile i want get user profile information in templates who is logged in. try everypossible solution but didn't achieve anything this is my profile models code below: from django.db import models from django.utils.transl

password_change redirect to user profile page

2013-04-21 Thread Nora Olsen
Hi, I have the following urlConf for password change: url(r'^users/(?P\d+)/$', UserProfile.as_view(), name='user_profile'), url(r'^password_change/$', auth_views.password_change, name='password_change'), I can't figure out to redirect to the use

multiple user profile solution

2012-11-22 Thread Juan Carlos Vargas Valencia
I have spend all yesterday making this run, and I have a solution. I dont know if its the best, but see it and please tel me if there is a mor professional way to do it: first I add in customize my user profile<https://docs.djangoproject.com/en/dev/topics/auth/#customizing-the-user-mo

Re: dashboard for user profile

2012-07-13 Thread psychok7
: > > This should be really easy. Google something like "extending user profile" > with user being a foreign key to your model. The you can grab the use from > the request in you view and get the info from db and just spit it out on > the screen. > > M > On Jul 13

Re: dashboard for user profile

2012-07-13 Thread Mario Gudelj
This should be really easy. Google something like "extending user profile" with user being a foreign key to your model. The you can grab the use from the request in you view and get the info from db and just spit it out on the screen. M On Jul 13, 2012 11:58 AM, "psychok7" wr

dashboard for user profile

2012-07-12 Thread psychok7
i there, i am trying to write a dashboard page to present after user login. i have been searching google and only found *django-admin-tools . won*dering if there is something like that for a user profile page (tried django-profiles with no luck) thanks -- You received this message because

Extending the user profile. Admin creation

2012-04-17 Thread abisson
Good evening, Here is my situation: 1. I extended the user profile in order to add custom fields. 2. I added the model to the User Admin Model, so when I am adding a user, I can fill in directly the fields to create the profile. 3. Now, if I don't add ANYTHING in these new c

Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan, On Tuesday, February 14, 2012 10:38:39 AM UTC-8, Jonathan Hayward wrote: Do I need to create a separate application under pim and load " application>.UserProfile"? >From the docs... To indicate that this model is the user profile model for a given site, fil

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
If I import models, it crashes. The top-level project is pim; under that I have models.py, which contains UserProfile. Specifying pim.UserProfile and pim.models.UserProfile gets two different error messages. Do I need to create a separate application under pim and load ".UserProfile"? On Tue, Feb

Re: Registering a user profile

2012-02-14 Thread Kevin Anthony
Did you include the module in your settings.py? Kevin Please excuse brevity, sent from phone On Feb 14, 2012 1:27 PM, "Christos Jonathan Hayward" < christos.jonathan.hayw...@gmail.com> wrote: > Thank you, little master and creecode. I tried 'pim.UserProfile' and > 'pim.models.UserProfile' and the

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
Thank you, little master and creecode. I tried 'pim.UserProfile' and 'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile', which it looks like the documentation calls for, I get: SiteProfileNotAvailable at / Unable to load the profile model, check AUTH_PROFILE_MODULE in your

Re: Registering a user profile

2012-02-14 Thread creecode
Hello Jonathan, See the "Storing additional information about users" section in the docs. There it mentions the expected format of AUTH_PROFILE_MODULE. I suspect what you need to do is wrap your Us

Re: User Profile Creation

2011-12-20 Thread Piotr Zalewa
allow to simply divide request to User and Profile fields. https://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms zalun On 12/15/11 22:46, bazaarsoft wrote: In all the examples I've seen of creating the user profile at the time a User is created, I always see the use of

User Profile Creation

2011-12-15 Thread bazaarsoft
In all the examples I've seen of creating the user profile at the time a User is created, I always see the use of the signal and the profile table's fields (except for user) have to be nullable. I don't see a way to break in to the creation process using the signal scheme such that

Re: Problem on user profile

2011-09-28 Thread jenia ivlev
Thanks but it wasnt this. I was tired and didnt see some gross mistakes. Thanks for your help though On Sep 28, 6:01 am, Thomas Orozco wrote: > You might be importing your models.py file multiple time, thus registering > the signals multiple times. > > You should look into the signals documentati

Re: Problem on user profile

2011-09-28 Thread Thomas Orozco
You might be importing your models.py file multiple time, thus registering the signals multiple times. You should look into the signals documentation - you can avoid duplicate signal handlers and this is covered there. Le 28 sept. 2011 14:44, "Lingfeng Xiong" a écrit : -- You received this mess

Problem on user profile

2011-09-28 Thread Lingfeng Xiong
hi there, I wanna build a user portal for my website. When a user log in, it can modify it's profile in this portal. I have already followed "https:// docs.djangoproject.com/en/1.3/topics/auth/" and created a class named UserProfile with "AUTH_PROFILE_MODULE = '.UserProfile' in settings.py.

Re: extending the User profile - which way to go?

2011-08-23 Thread Tom Evans
On Sun, Aug 21, 2011 at 2:52 PM, Matt Schinckel wrote: > You haven't really provided a reason why to 'do it the django way', rather > than inheriting from User. Here is the top one: Extending the user object will make your project incompatible with 3rd party pluggable apps, as they will not be us

Re: extending the User profile - which way to go?

2011-08-21 Thread Axel Bock
Thanks for all your replies, it makes sense to wait until it's a performance problem :) Greetings, Axel. Am 21.08.2011 um 22:14 schrieb Simon Connah: > On 21 Aug 2011, at 19:37, Shawn Milochik wrote: > >> Using a OneToOne field does the same thing as a FK with unique set to true, >> and si

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
On 21 Aug 2011, at 19:37, Shawn Milochik wrote: > Using a OneToOne field does the same thing as a FK with unique set to true, > and simplifies queryset syntax. Good point. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: extending the User profile - which way to go?

2011-08-21 Thread Shawn Milochik
Using a OneToOne field does the same thing as a FK with unique set to true, and simplifies queryset syntax. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from t

Re: extending the User profile - which way to go?

2011-08-21 Thread Simon Connah
My personal preference is to just create a new model class with a ForeignKey field pointing to the User model with unique=True set. That way you can extend the User object in as many different apps as you want. For instance in a forum app you could have a model tracking the number of posts a use

Re: extending the User profile - which way to go?

2011-08-21 Thread Matt Schinckel
You haven't really provided a reason why to 'do it the django way', rather than inheriting from User. You do make a valid point about the separate data being in a different table: the difference would be that with using UserProfile, you need to either do the .select_related() yourself, of have

Re: extending the User profile - which way to go?

2011-08-20 Thread Subhranath Chunder
My suggestion, do it the Django way. In any case, even if you use the inheritance model, the additional data would be stored in a separate database table, and the data belonging to the super-class would be stored in the main user's database table. On Sun, Aug 21, 2011 at 1:26 AM, Axel Bock wrote:

extending the User profile - which way to go?

2011-08-20 Thread Axel Bock
Hi again, I will need to add some properties to a user in the future. Now I found two ways of doing it. First, the Django-way (as described in the Django docs). Then I found some other posts from other people, all doing an inheritance of the original User-class and using this one. That seems ra

Re: Simple example of custom user profile fields?

2011-07-13 Thread i...@webbricks.co.uk
read the paragraph on the AUTH_PROFILE_MODULE in james blog. especially understand you're pointing it at a modelname, but that it knows its a model caught me out once upon a time and might be your issue. Matt On Jul 13, 3:57 am, Brent wrote: > Unfortunately, no matter what kind of path I pu

Re: Simple example of custom user profile fields?

2011-07-13 Thread i...@webbricks.co.uk
if i can extend the user model, anybody should be able to. i followed james bennett example. in fact most of the clever stuff i do came from his tuts http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ at this point, i'd suggest a clean virtualenv, with a single app, single

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
I'm using python manage.py runserver, and I have restarted it dozens of times. On Jul 12, 8:58 pm, Micky Hulse wrote: > On Tue, Jul 12, 2011 at 7:57 PM, Brent wrote: > > Unfortunately, no matter what kind of path I put for > > AUTH_PROFILE_MODULE, the same error appears. > > I don't know your se

Re: Simple example of custom user profile fields?

2011-07-12 Thread Micky Hulse
On Tue, Jul 12, 2011 at 7:57 PM, Brent wrote: > Unfortunately, no matter what kind of path I put for > AUTH_PROFILE_MODULE, the same error appears. I don't know your setup, but have your tried restating Apache? That's probably a stupid question/suggestion, but maybe worth a shot? -- You receive

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Unfortunately, no matter what kind of path I put for AUTH_PROFILE_MODULE, the same error appears. On Jul 12, 5:51 pm, Andre Terra wrote: > As the traceback helpfully states, > > Exception Type: SiteProfileNotAvailable at /profile/Exception Value: > Unable to load the profile model, check AUTH_PRO

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
As the traceback helpfully states, Exception Type: SiteProfileNotAvailable at /profile/Exception Value: Unable to load the profile model, check AUTH_PROFILE_MODULE in your project settings http://www.google.com/search?&q=django+Unable+to+load+the+profile+model%2C+check+AUTH_PROFILE_MODULE+in+your

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Good idea. Unfortunately, I tried that, but it results in a SiteProfileNotAvailable error: http://dpaste.com/567421/ On Jul 12, 3:15 pm, Andre Terra wrote: > Instead of using get or create, why not setting up a post_save signal > for the User model so that users always have a profile associated

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
Instead of using get or create, why not setting up a post_save signal for the User model so that users always have a profile associated with them? Cheers, Andre On 7/12/11, Brent wrote: > Thanks for the help guys. > > Micky, that tutorial looks very good. I think I almost have it > working. Just

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Running syncdb again didn't seem to fix it. I tried deleting the database entirely, and starting from a new database, but that also didn't work. On Jul 12, 2:28 pm, Shawn Milochik wrote: > On Tue, Jul 12, 2011 at 5:26 PM, Brent wrote: > > Thanks for the help guys. > > > Micky, that tutorial look

Re: Simple example of custom user profile fields?

2011-07-12 Thread Shawn Milochik
On Tue, Jul 12, 2011 at 5:26 PM, Brent wrote: > Thanks for the help guys. > > Micky, that tutorial looks very good. I think I almost have it > working. Just one more error: > > http://dpaste.com/567361/ > Looks like maybe you didn't run syncdb after adding something to INSTALLED_APPS. -- You r

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Thanks for the help guys. Micky, that tutorial looks very good. I think I almost have it working. Just one more error: http://dpaste.com/567361/ Andre, thanks for mentioning Pinax. I'll give it a shot if this doesn't work out. I have a year of python experience, but I haven't written anything we

Re: Simple example of custom user profile fields?

2011-07-12 Thread Micky Hulse
This tutorial helped me: http://www.turnkeylinux.org/blog/django-profile Note: The above tutorial uses an FK to User model... The Django docs suggest a OneToOne field. Hope that helps. Micky -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
On Tue, Jul 12, 2011 at 2:51 PM, Brent wrote: > Hi, > > Does anyone know of a simple, working example of custom user profile > fields? > > I want to have a custom field, say, "favorite color," which is unique > to each user. Then I want users to be able to login,

Re: Simple example of custom user profile fields?

2011-07-12 Thread Shawn Milochik
https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users Everything you should need is in here. Once you have something started I can probably help out if you have any specific questions. Also, as long as you have a one-to-one field there's really no need to

Simple example of custom user profile fields?

2011-07-12 Thread Brent
Hi, Does anyone know of a simple, working example of custom user profile fields? I want to have a custom field, say, "favorite color," which is unique to each user. Then I want users to be able to login, and be taken to a page called "profile" that displays that custom fi

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Shawn Milochik
On 06/22/2011 11:41 AM, Satyajit Sarangi wrote: Now I get a database error relation "registration_userprofile" does not exist LINE 1: ..."."id", "registration_userprofile"."user_id" FROM "registrat... That looks like a migration/syncdb issue. Either you added a field to an already-synced mod

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
Now I get a database error relation "registration_userprofile" does not exist LINE 1: ..."."id", "registration_userprofile"."user_id" FROM "registrat... On Wed, Jun 22, 2011 at 8:58 PM, Shawn Milochik wrote: > On 06/22/2011 11:25 AM, Satyajit Sarangi wrote: > >> Traceback: >> >> 60.

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Shawn Milochik
On 06/22/2011 11:25 AM, Satyajit Sarangi wrote: Traceback: 60. url(r'^profile/$',UserProfile,name='UserProfile'), Exception Type: NameError at /accounts/profile/ Exception Value: name 'UserProfile' is not defined It appears that you have a view named UserProfile in

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
Traceback: File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response 101. request.path_info) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve 252. sub_match = pattern.resolve(new

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Shawn Milochik
On 06/22/2011 11:21 AM, Satyajit Sarangi wrote: These are my steps . 1. Not using django-profile 2. Create my own view to show the profile by using user.get_profile() 3. Created my own view and also a model in django-registration to view the profile . 4 . Did changes to urls.py url(r'^profile/

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
These are my steps . 1. Not using django-profile 2. Create my own view to show the profile by using user.get_profile() 3. Created my own view and also a model in django-registration to view the profile . 4 . Did changes to urls.py url(r'^profile/$',register.UserProfile,name='user.get_profile()'),

Re: how to set up user profile in django-registration ?

2011-06-22 Thread Piotr Zalewa
On 06/22/11 16:09, Satyajit Sarangi wrote: I am using django registration , which is not displaying any profile when I log in . Thus I am not able to login . What should I do to overcome this ? I assume you've been reading docs already. (django-registration and django user management ones, po

how to set up user profile in django-registration ?

2011-06-22 Thread Satyajit Sarangi
I am using django registration , which is not displaying any profile when I log in . Thus I am not able to login . What should I do to overcome this ? -- 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

Re: Update a user profile after LInkedin Oauth

2011-05-21 Thread Mike Ryan
with the data returned by LinkedIn I do something similar with a different oAuth provider, and it works quite nicely. On May 21, 2:45 am, CrabbyPete wrote: > I am trying to update a user profile of an existing user with a > LinkedIn profile. My problem is I need an email address, b

Update a user profile after LInkedin Oauth

2011-05-20 Thread CrabbyPete
I am trying to update a user profile of an existing user with a LinkedIn profile. My problem is I need an email address, but LinkedIn does not give you that information. So I have a user create an account with their email address and ask if they want to link their profile to their LinkedIn profile

Re: User Profile and Form initial values

2011-04-27 Thread James
Doh! As much as I read in the forms section, I skipped the ModelForms part, even though that's what I was using! Thanks again! James -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroup

Re: User Profile and Form initial values

2011-04-26 Thread Shawn Milochik
Yeah, it's documented. Right at the tippy-top of the ModelForms docs. http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups

Re: User Profile and Form initial values

2011-04-26 Thread Shawn Milochik
On 04/26/2011 06:04 PM, Kenny Meyer wrote: On Tue, Apr 26, 2011 at 4:17 PM, Shawn Milochik wrote: If you're creating a ModelForm that already has data in the database, don't pass in request.POST. Instead, pass in the instance with the 'instance' keyword argument. For example, if it was a Model

Re: User Profile and Form initial values

2011-04-26 Thread Kenny Meyer
On Tue, Apr 26, 2011 at 4:17 PM, Shawn Milochik wrote: > If you're creating a ModelForm that already has data in the database, don't > pass in request.POST. Instead, pass in the instance with the 'instance' > keyword argument. > > For example, if it was a ModelForm for the User object: form = > Us

Re: User Profile and Form initial values

2011-04-26 Thread James
That did it. 99% of the time the data will be there; I can write exception clauses for when it isn't. I think I'll use this method, though I had just discovered the "initial" dictionary argument as well, a few minutes before I noticed your reply. Is there a spot in the Django docs that explains thi

Re: User Profile and Form initial values

2011-04-26 Thread Shawn Milochik
If you're creating a ModelForm that already has data in the database, don't pass in request.POST. Instead, pass in the instance with the 'instance' keyword argument. For example, if it was a ModelForm for the User object: form = UserForm(instance = request.user) -- You received this messa

User Profile and Form initial values

2011-04-26 Thread James
I'm struggling to create a method by which a user can update his user profile, where the current information is displayed in the "edit" form, and I'm hoping someone here can point out what I'm doing wrong. I am not using ubernostrum's django-profiles for this bec

Re: extend an existing model (not the user profile)

2011-04-20 Thread Simone Orsi
example except the one for the user profile. > > I'm trying to extend an existing model adding some fields. > > It seems there's no "clean way" to this but creating a related model for > it (as per the user profile pattern [1]). > >

Re: extend an existing model (not the user profile)

2011-04-20 Thread Daniel Roseman
On Wednesday, April 20, 2011 12:22:15 PM UTC+1, Simone Orsi wrote: > > Hi, > > first of all I'm sorry if this argument has been discussed somewhere but > I cannot find any real example except the one for the user profile. > > I'm trying to extend an existing model a

extend an existing model (not the user profile)

2011-04-20 Thread Simone Orsi
Hi, first of all I'm sorry if this argument has been discussed somewhere but I cannot find any real example except the one for the user profile. I'm trying to extend an existing model adding some fields. It seems there's no "clean way" to this but creating a related

Re: automatically create user profile on user creation

2011-03-18 Thread Ori Livneh
register a handler for the > signal > > django.db.models.signals.post_save on the User model, and, in the > handler, > > if created=True, create the associated user profile." ( > http://goo.gl/jNo91) > > > > But there's no code sample. A few weeks a

Re: automatically create user profile on user creation

2011-03-16 Thread shantp
xist. You need to register a handler for the signal > django.db.models.signals.post_save on the User model, and, in the handler, > if created=True, create the associated user profile." (http://goo.gl/jNo91) > > But there's no code sample. A few weeks ago (with some help from frien

automatically create user profile on user creation

2011-03-16 Thread Ori Livneh
Hi guys, The Django docs explain that "the method get_profile() does not create the profile, if it does not exist. You need to register a handler for the signal django.db.models.signals.post_save on the User model, and, in the handler, if created=True, create the associated user profile.&q

One project, many apps, how to share single user profile

2010-12-17 Thread donn
an't find A.UserProfile error.) I did manage to get A_userprofilebase, B_userprofile and C_userprofile -- but that's three tables! I have not yet hacked a way to reach the user profile from the user. (I am doing this by subclassing a model: A has the main class, userprofil

Re: How to join a search on user and user profile

2010-11-28 Thread Rogério Carrasqueira
Sorry for botter you John. I found my information: search_fields = ['foreign_key__related_fieldname'] http://docs.djangoproject.com/en/dev/ref/contrib/admin/ Thanks so much! Rogério Carrasqueira --- e-mail: rogerio.carrasque...@gmail.com skype: rgcarrasqueira MSN: rcarrasque...@hotmail.com ICQ

Re: How to join a search on user and user profile

2010-11-28 Thread Rogério Carrasqueira
Some one can help? Rogério Carrasqueira --- e-mail: rogerio.carrasque...@gmail.com skype: rgcarrasqueira MSN: rcarrasque...@hotmail.com ICQ: 50525616 Tel.: (11) 7805-0074 Em 22 de novembro de 2010 15:47, Rogério Carrasqueira < rogerio.carrasque...@gmail.com> escreveu: > Thanks Chris, > > But I

Re: How to join a search on user and user profile

2010-11-22 Thread Rogério Carrasqueira
Thanks Chris, But I would like to use on admin, using the search_fields Cheers Rogério Carrasqueira --- e-mail: rogerio.carrasque...@gmail.com skype: rgcarrasqueira MSN: rcarrasque...@hotmail.com ICQ: 50525616 Tel.: (11) 7805-0074 2010/11/22 Chris Lawlor > You should be able to do somethin

Re: How to join a search on user and user profile

2010-11-22 Thread Chris Lawlor
You should be able to do something like: UserProfile.objects.filter(gender='female', user__email='some...@mail.com') Note the double underscore notation, which let's you access attributes of the related model. This example assumes that UserProfile has a FK field to User which is named 'user'. On

  1   2   3   >