Re: User.get_profile() not working

2010-09-29 Thread Daniel Roseman
On Sep 29, 4:34 am, Skylar Saveland wrote: > Using *args and **kwargs might work > > then maybe > > self.website = kwargs.get('website', 'default.com') But the point is, there's no need to do that. That is built-in functionality: both the setting of 'website' via

Re: User.get_profile() not working

2010-09-29 Thread adj7388
Still learning. Always learning. I guess I learn best when I break stuff and do dumb things. Thanks to all who replied for the great advice and tips. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: User.get_profile() not working

2010-09-28 Thread Skylar Saveland
Using *args and **kwargs might work then maybe self.website = kwargs.get('website', 'default.com') On Sep 28, 1:45 pm, adj7388 wrote: > Django newbie issue. Just trying to understand. I'm setting up a > simple UserProfile class to link to User (as described in several >

Re: User.get_profile() not working

2010-09-28 Thread Skylar Saveland
Overriding __init__ might be a little shady, but you probably can get away with it if you use *args and **kwargs On Sep 28, 1:45 pm, adj7388 wrote: > Django newbie issue. Just trying to understand. I'm setting up a > simple UserProfile class to link to User (as described in

Re: User.get_profile() not working

2010-09-28 Thread Daniel Roseman
On Sep 28, 6:45 pm, adj7388 wrote: > Django newbie issue. Just trying to understand. I'm setting up a > simple UserProfile class to link to User (as described in several > places in documentation). Here's what I have --- a simple example of > storing the user's website in a

Re: User.get_profile() not working

2010-09-28 Thread adj7388
Good grief. After spending hours trying to figure out what was wrong, I immediately found the problem after making this post. Here's the solution: I had overridden UserProfile.__init__() like this: class UserProfile(models.Model): def __init__(self, website='http://www.default.com'): while

Re: User.get_profile() not working

2010-09-28 Thread Ale
On Tue, Sep 28, 2010 at 2:45 PM, adj7388 wrote: > Django newbie issue. Just trying to understand. I'm setting up a > simple UserProfile class to link to User (as described in several > places in documentation). Here's what I have --- a simple example of > storing the user's

User.get_profile() not working

2010-09-28 Thread adj7388
Django newbie issue. Just trying to understand. I'm setting up a simple UserProfile class to link to User (as described in several places in documentation). Here's what I have --- a simple example of storing the user's website in a profile #In myapp/models.py class UserProfile(models.Model):