Re: Base Class Inheritance w/ Model Methods

2009-07-15 Thread Andrew D. Ball

On Wed, Jul 15, 2009 at 06:35:06AM -0700, LeeRisq wrote:
> 
> So I'm hitting a beginner's snag here. I have six models that I need
> to contain essentially all the same attributes. I created a base class
> and then created the child classes respectively. Some of the child
> classes will contain additional attributes to the base class, but the
> rest only need what is defined within the base class.
> 
> Is there a required minimum number of attributes that a child class
> must have to validate? For instance, can the child class have zero
> attributes because it inherits all of them from the base class?
Yes.
> 
> 
> > 

-- 
===
Andrew D. Ball
ab...@americanri.com
Software Engineer
American Research Institute, Inc.
http://www.americanri.com/

--~--~-~--~~~---~--~~
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 this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Base Class Inheritance w/ Model Methods

2009-07-15 Thread LeeRisq

So I'm hitting a beginner's snag here. I have six models that I need
to contain essentially all the same attributes. I created a base class
and then created the child classes respectively. Some of the child
classes will contain additional attributes to the base class, but the
rest only need what is defined within the base class.

Is there a required minimum number of attributes that a child class
must have to validate? For instance, can the child class have zero
attributes because it inherits all of them from the base class?


--~--~-~--~~~---~--~~
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 this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---