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
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
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
>
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
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
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
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
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):
8 matches
Mail list logo