Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7927 closed (worksforme)

Form Field not rendered

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


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 Changed 8 years ago by Bjorn Kristinsson

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.


{% 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 Changed 5 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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