Re: Import issue using signals.py

2006-10-19 Thread Waylan Limberg
On 10/19/06, MerMer <[EMAIL PROTECTED]> wrote: > > > > The quick fix here is to replace that line with > > > > from mysite.promotions import signals > > > > The quick fix here didn't work. I would then get > "update_review_average is undefined." Right, however `signals.update_review_aver

Re: Import issue using signals.py

2006-10-19 Thread MerMer
> The quick fix here is to replace that line with > > from mysite.promotions import signals > The quick fix here didn't work. I would then get "update_review_average is undefined." However, many thanks for the explanation, I'll go through it and if I have further questions come back.

Re: Import issue using signals.py

2006-10-19 Thread Malcolm Tredinnick
On Thu, 2006-10-19 at 05:27 -0700, MerMer wrote: > Malcom, many thanks. > > I have to admit as a newbie to Python and Django and I dont' fully > understand how "import" works. I just presumed that you put a > reference to any module at the top. You can. But you aren't referring to a module, you

Re: Import issue using signals.py

2006-10-19 Thread MerMer
Apologies but "from mysite.promotions.signals import update_review_average" should read "from mysite.products.signals import update_review_average" MerMer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Import issue using signals.py

2006-10-19 Thread MerMer
Malcom, many thanks. I have to admit as a newbie to Python and Django and I dont' fully understand how "import" works. I just presumed that you put a reference to any module at the top. At the top of the product.models.py file I have the following:- "from mysite.promotions.signals import updat

Re: Import issue using signals.py

2006-10-19 Thread Malcolm Tredinnick
On Thu, 2006-10-19 at 04:32 -0700, MerMer wrote: > I've tried to set up a signals.py file in the same directory as my app > ("products"). > > At the top of the signals.py I have the following import statement: > > from myapp.products.models import Product, Review > > The two model classes (Prod

Import issue using signals.py

2006-10-19 Thread MerMer
I've tried to set up a signals.py file in the same directory as my app ("products"). At the top of the signals.py I have the following import statement: from myapp.products.models import Product, Review The two model classes (Product and Review) both sit in the models.py in the products directo