django model problem
Mark
ma.ston.99 at hotmail.com
Fri Apr 3 16:03:57 EDT 2009
> I think the first thing you need to do is decide if there is going to be
> more than one Musician object. and more than one Album object.
> Presently you are giving all musicians the same first_name and
> last_name. I suggest you look up the documentation for the special
> method __init__()
>
> Then you need to realize that assigning new attributes to an instance
> object needs to be done inside an instance method, either __init__() or
> some other method with a self parameter.
What you say would normally make sense, but it's Django and it works that
way here. See:
http://docs.djangoproject.com/en/dev/topics/db/models/#fields
Regards
MS
More information about the Python-list
mailing list