Thanks you 2 for your answers.

I think I've understood now. Again I apologize for the newby Python
question but I've read three times "Dive in Python" and it hasn't made
me thnigs clear. That's the reason why I've posted.

I thought there was a hierarchy like this models.Model.CharField ....

That's the reason why I didn't understood.

Daniel, you said, that a method can be imported, this mean that an
external method (method from a class like Model) can't be used
directly in the Person class for example ?

If I understand well, in "first_name =
models.CharField(max_length=30)", first_name is an instance of class
CharField. This instance send "30" to the "max_length" parameter of
class CharField. This parameter is used by an internal method of class
CharFiled. Is that right ? :-)

Thanks again to all

Regards

Alain



On 17 oct, 08:53, Webb Newbie <new...@avatarific.com> wrote:
> "models" is a module that contains classes Model and CharField.
>
> Person inherits from Model.
>
> first_name and last_name are instances of CharField.
>
> There's no functional programming here.
>
> -WN.
>
>
>
>
>
>
>
> On Sun, Oct 16, 2011 at 6:43 PM, youpsla <youp...@gmail.com> wrote:
> > 1 from django.db import models
> > 2
> > 3 class Person(models.Model):
> > 4     first_name = models.CharField(max_length=30)
> > 5     last_name = models.CharField(max_length=30)

-- 
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.

Reply via email to