A module is a python file -> you must put it somewhere in the begin of
thefile where the error took place. This is the lates one in the backtrace
(usually) in your case :

File
"/usr/lib/python2.5/site-packages/Satchmo-0.9_pre-py2.5.egg/product/utils.py
", line 18, in calc_discounted_by_percentage
    cents = Decimal("0.01")
NameError: global name 'Decimal' is not defined

günter

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Shankar Dhanasekaran
Gesendet: Donnerstag, 08. Jänner 2009 13:39
An: [email protected]
Betreff: Re: AW: Discount temlate error


Thanks Günter Walser. I will open a ticket for this. Meantime, can you
explain if this 'importing' need to be done in template file or in the
models.py file? I havent seen importing in template files in satchmo. 


Thanks,
Shakthi

On Thu, 2009-01-08 at 13:33 +0100, Günter Walsec wrote:
> Yes, seems so. You must import Decimal first in the begi'tn of the 
> module
> (file) - then it should work. Something lik
> 
> try:
>     from decimal import Decimal
> except ImportError:
>     from django.utils._decimal import Decimal
> 
> Please raise also a bug
> 
> -----Ursprüngliche Nachricht-----
> Von: [email protected] 
> [mailto:[email protected]]
> Im Auftrag von Shankar Dhanasekaran
> Gesendet: Donnerstag, 08. Jänner 2009 13:13
> An: [email protected]
> Betreff: Discount temlate error
> 
> 
> After adding a discount percentage by entering the value '0.10' in 
> admin, i got TemplateSyntaxError http://dpaste.com/106700/
> 
> 
> is it a bug?
> 
> 
> 
> 
> > 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to