Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7927 closed (worksforme)

Form Field not rendered

Reported by: Oliver Weichhold <oliver@…> Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords: forms, i18n',
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

from django import forms
from django.utils.translation import ugettext_lazy

class SearchForm(forms.Form):
  realm = forms.CharField(max_length = 100, required = True,
    widget = forms.TextInput(attrs = {' title': ugettext_lazy("lblSearchRealm") }))

If ugettext_lazy("lblSearchRealm") returns a value containing an umlaut, the "realm" fields is totally absent from the generated output for the page.

Change History (2)

comment:1 by Bjorn Kristinsson, 16 years ago

Resolution: worksforme
Status: newclosed

Ran the code, both through shell and a rendered template, with and without fixing the space in ' title':, with lblSearchRealm set to "myfürm" in the appropriate mo/po, and I got the input field in every case.

Template:

{% load i18n %}
{{ form }}

And Shell:

print SearchForm()

Results in:

<tr><th><label for="id_realm">Realm:</label></th><td><input id="id_realm" type="text"  title="myfürm" name="realm" maxlength="100" /></td></tr>

Works for me.

comment:2 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

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