#2037: Doesn't make sense to have a blank option in dropdowns for non-nullable,
non-blankable fields with defaults
----------------------+-----------------------------------------------------
   Reporter:  Joeboy  |                Owner:  adrian         
     Status:  new     |            Component:  Admin interface
    Version:  SVN     |           Resolution:                 
   Keywords:          |                Stage:  Accepted       
  Has_patch:  0       |           Needs_docs:  0              
Needs_tests:  0       |   Needs_better_patch:  0              
----------------------+-----------------------------------------------------
Changes (by Simon G. <[EMAIL PROTECTED]>):

  * stage:  Unreviewed => Accepted

Comment:

 Here's one:
 
 {{{
 from django.db import models
 
 # Create your models here.
 class TestModel(models.Model):
     """ Simple Test Model. """
 
     CHOICES = (
         (0, 'State A'),
         (1, 'State B'),
     )
 
 
     emptynotallowed = models.CharField(maxlength=1, choices=CHOICES)
     emptyallowed = models.CharField(maxlength=1, choices=CHOICES,
 null=True, blank=True)
     defaultemptynotallowed = models.CharField(maxlength=1,
 choices=CHOICES, default=2)
     defaultemptyallowed = models.CharField(maxlength=1, choices=CHOICES,
 null=True, blank=True, default=2)
 
     class Admin:
         pass
 }}}
 
 So - only emptynotallowed should have the blank drop-down option

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2037#comment:2>
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