Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19522 closed Bug (invalid)

ModelForm and BooleanField

Reported by: anonymous Owned by: nobody
Component: Forms Version: 1.5-alpha-1
Severity: Normal Keywords: modelform
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

class TestModel(models.Model):

b = models.BooleanField(db_index=True, default=True)
class Meta:

db_table = 'test'
app_label = 'test'

class TestModelForm(forms.ModelForm):

class Meta:

model = TestModel

f = TestModelForm()

{{ f }} -- no view form

Change History (5)

comment:1 Changed 3 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.4-alpha-1 to 1.5-alpha-1

comment:2 in reply to: ↑ description Changed 3 years ago by anonymous

# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _

class TestModel(models.Model):

b = models.BooleanField(db_index=True, default=True, verbose_name=_('Кириллица'))



class TestModelForm(forms.ModelForm):

class Meta:

model = TestModel


f = TestModelForm()


{{ f }} -- no view form


comment:3 Changed 3 years ago by anonymous

Must user _(u'Кириллица')

Remove this ticket, please.

comment:4 Changed 3 years ago by timo

  • Resolution set to invalid
  • Status changed from new to closed

comment:5 Changed 3 years ago by anonymous

This problem not raise exception.

Note: See TracTickets for help on using tickets.
Back to Top