In the model below, using the Django admin, no matter what value I choose, 
it always displays the default value. But writes the correct value in the 
 database. Am I doing something wrong or is this a bug?

TENSAO_220 = Decimal(220)
TENSAO_110 = Decimal(110)
TENSOES = ((TENSAO_220, '220 volts'),
           (TENSAO_110, '110 volts'))

class Equipamento(models.Model):
    nome = models.CharField(max_length=128)
  tensao = models.DecimalField(max_digits=8,
                               decimal_places=3,
                               choices=TENSOES,
                               default=TENSAO_220)

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dae72145-de71-48b2-9fd8-33f010e11ee1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to