#35556: The checkbox of a BooleanField is displayed before field's name
-------------------------------+--------------------------------------
     Reporter:  Omid Shojaee   |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  5.0
     Severity:  Normal         |               Resolution:  needsinfo
     Keywords:  checkbox       |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  1
-------------------------------+--------------------------------------
Comment (by Omid Shojaee):

 This is the model definition:

 {{{
 class Product(models.Model):
     name = models.CharField(max_length=255, verbose_name=_('product
 name'))
     slug = models.SlugField(
         max_length=255, unique=True, allow_unicode=True,
 verbose_name=_('product slug')
     )
     brand = models.ForeignKey(
         Brand,
         on_delete=models.CASCADE,
         related_name='products',
         verbose_name=_('product brand'),
     )
     category = models.ForeignKey(
         Category,
         on_delete=models.CASCADE,
         related_name='products',
         verbose_name=_('product category'),
     )
     image = FileBrowseField(
         max_length=255,
         directory='products/',
         extensions=['.jpg', '.jpeg', '.png'],
         verbose_name=_('product image'),
     )
     quantity = models.PositiveIntegerField(
         verbose_name=_('product quantity'), default=0
     )
     price = models.PositiveIntegerField(verbose_name=_('product price'),
 default=0)
     featured = models.BooleanField(verbose_name=_('featured'),
 default=False)

     class Meta:
         verbose_name = _('product')
         verbose_name_plural = _('products')

     def __str__(self):
         return self.name

 }}}

 Looking at the second screenshot I attached, all fields are like this:

 From left to right: Field name and then input box

 Except for the boolean field, where the checkbox is to the left of the
 field name.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35556#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701904bb88076-f28d38e1-e92e-4897-aab2-0959221b7e4e-000000%40eu-central-1.amazonses.com.

Reply via email to