Thanks.
I will keep this in mind.
On Sun, Sep 12, 2010 at 12:51 PM, Justin Myers wrote:
> Another idea would be to connect to User's post-save signal. You can
> set it up to check whether the User instance being saved is just being
> created, and if so, you can create its UserProfile instance a
Another idea would be to connect to User's post-save signal. You can
set it up to check whether the User instance being saved is just being
created, and if so, you can create its UserProfile instance at the
same time. That'd make it so all future users have profiles as soon as
they're created; once
I think that my main problem was that I was expecting the save to the model
form to actually create the profile.
Here's what I ended up with in my view.
86 @login_required
87 def createProfile(request):
88 UserProfile.objects.get_or_create(user=request.user)[0]
89 if request.method ==
Thanks.
That helped me figure it out. I'll post my solution back later
today/tonight.
On Sat, Sep 11, 2010 at 12:37 AM, Shawn Milochik wrote:
> I think you just may be missing a call to get_profile() in this view.
> You can just do that and do a try block with an except block for
> DoesNotExi
I think you just may be missing a call to get_profile() in this view.
You can just do that and do a try block with an except block for
DoesNotExist. That will let you know the situation you're in, whether
the profile already existed or not.
Also, unless I'm misreading something you're trying to pa
5 matches
Mail list logo