#3593: Field default values don't seem to work as expected
------------------------------+---------------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  adrian          
  Status:  new                |   Component:  Database wrapper
 Version:  SVN                |    Keywords:                  
   Stage:  Unreviewed         |   Has_patch:  0               
------------------------------+---------------------------------------------
 If I have the given model in an app:
 
 {{{
 class Products(models.Model):
         name = models.CharField(maxlength=150)
         list_price = models.CharField(max_digits=10, decimal_places=2,
 default=0.00, blank=True)
         price = models.CharField(max_digits=10, decimal_places=2)
 
         class Admin:
                 pass
 }}}
 
 When adding a new product through the admin site you will get an
 IntegrityError saying that list_price may not be NULL.  I have tested this
 with MySQL and SQLite and both result in this error.  While I could change
 the value on the fly before saving the object, but the default parameter
 would seem like it should handle that for me.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3593>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to