Wednesday, June 2, 2010

Class in a Class

Hello,

I'm lost in Python !!
If I write this ....

class Dated(Behavior):

created_on = models.DateTimeField(_('Created on'))
updated_on = models.DateTimeField(_('Updated on'))

class Events:

def __init__(self):
super(Events, self).__init__()

.... I get an error : NameError: global name 'Events' is not defined

Is not Events a real class ??
I don't understand, please help !

Thanks,
JF

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

No comments:

Post a Comment