﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8107	Invalid HTML output generated for BooleanFields using Python 2.3	RaceCondition <eallik@…>	nobody	"Using ugettext_lazy, the following model results in invalid HTML generated in the admin area.

{{{
class Page(models.Model):
    """"""A simple hierarchical page model""""""
    
    STATUS_DRAFT = 0
    STATUS_PUBLISHED = 1
    STATUSES = (
        (STATUS_DRAFT, _('Draft')),
        (STATUS_PUBLISHED, _('Published')),
    )
    
    title = models.CharField(_('title'), max_length=100)
    body = models.TextField(_('body'), blank=True, help_text=_('Only use the enter/return key for creating new paragraphs, try not to use any line breaks.'))
    slug = models.SlugField(_('slug'), blank=True)
    
    parent = models.ForeignKey('self', verbose_name=_('parent'), related_name=""children"", blank=True, null=True)
    order = models.PositiveSmallIntegerField(_('order'))
    
    creation_date = models.DateTimeField(_('creation date'), editable=False, default=datetime.now)
    publication_date = models.DateTimeField(_('publication date'), editable=False, null=True)
    
    published = models.BooleanField(_('is published'), default=False)
    is_folder = models.BooleanField(_('is folder'), default=False)
}}}

Generated HTML for the two BooleanFields:

{{{
<div class=""form-row published"">
	<input type=""checkbox"" name=""published"" id=""id_published"" /><label for=""id_published"" class=""vCheckboxLabel""><django.utils.functional.__proxy__ object at 0x2aa3374990></label>
</div>
<div class=""form-row is_folder"">
	<input type=""checkbox"" name=""is_folder"" id=""id_is_folder"" /><label for=""id_is_folder"" class=""vCheckboxLabel""><django.utils.functional.__proxy__ object at 0x2aa3374950></label>
</div>
}}}"		closed	Internationalization	dev		fixed			Accepted	1	0	1	0	0	0
