Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-29 Thread Daniel Strasser
Thank you very much for your precise answer. I think I misunderstood a lot and I will go through the tutorial again. On 28 Okt., 15:04, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 28 oct, 14:05,DanielStrasser<[EMAIL PROTECTED]> wrote: > > > > You have a circular reference between students

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread bruno desthuilliers
On 28 oct, 14:05, Daniel Strasser <[EMAIL PROTECTED]> wrote: > > You have a circular reference between students.models and > > lessons.models. The first want to import the second, which want to > > import the first, etc... This just can't work. > > Thank you very much. I played around but I don't

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
> You have a circular reference between students.models and > lessons.models. The first want to import the second, which want to > import the first, etc... This just can't work. Thank you very much. I played around but I don't come to a solution. I think I'll try again. I just don't understand wh

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread bruno desthuilliers
On 28 oct, 08:54, Daniel Strasser <[EMAIL PROTECTED]> wrote: > Hi Daniel > > > This is why it's a bad idea to do from x import *. You should always > > import the things you need explicitly, then you can tell what's going > > wrong. Try doing > > from schoolutil.lesson.models import Lesson > > and

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
Hi Daniel > This is why it's a bad idea to do from x import *. You should always > import the things you need explicitly, then you can tell what's going > wrong. Try doing > from schoolutil.lesson.models import Lesson > and see if it still goes wrong - or if you get a more informative > error mes

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Roseman
On Oct 28, 7:32 am, Daniel Strasser <[EMAIL PROTECTED]> wrote: > Hello Djangonauts, > > I get a NameError and I don't know why, I'm really getting mad. What I > want to do is to list the number of Lessons a Student has passed. > > My schoolutil/student model looks like this: > > from django.db imp

Getting a NameError: global name 'Lesson' is not defined

2008-10-28 Thread Daniel Strasser
Hello Djangonauts, I get a NameError and I don't know why, I'm really getting mad. What I want to do is to list the number of Lessons a Student has passed. My schoolutil/student model looks like this: from django.db import models from schoolutil.lesson.models import * class Student(models.Mode