klipstein/dojango — Issue #22: 22 - Error with attrs in widget Select 
Author: klipstein
Created: 2011-11-06 12:54:07+00:00
State: open

What steps will reproduce the problem?
make this form for the admin interface
class EmpresaForm(forms.ModelForm):
ciudad1 =
fields.ChoiceField(widget=widgets.Select(attrs={'store':'ciudadStore','class':'asdf'}),
required=False, help_text='Test')

What is the expected output? What do you see instead?
expected output:
<input dojoType="dijit.form.FilteringSelect"
promptMessage="Test"
required="false"
type="text"
class="asdf"/>

the real output:

<div class="form-row ciudad1">
<div>
<label id="id_ciudad1_label" for="id_ciudad1">Ciudad1:</label>
<div id="widget_id_ciudad1" class="dijit dijitReset dijitInlineTable
dijitLeft asdf dijitComboBox dijitComboBoxError dijitError" tabindex="-1"
wairole="combobox" dojoattachpoint="comboNode"
dojoattachevent="onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse"
role="combobox" widgetid="id_ciudad1" aria-labelledby="id_ciudad1_label">
<div style="overflow: hidden;">
<div class="dijitReset dijitRight dijitButtonNode dijitArrowButton
dijitDownArrowButton"
dojoattachevent="onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse"
wairole="presentation" dojoattachpoint="downArrowNode" role="presentation">
<div class="dijitArrowButtonInner"> </div>
<div class="dijitArrowButtonChar">▼</div>
</div>
<div class="dijitReset dijitValidationIcon">
<br/>
</div>
<div class="dijitReset dijitValidationIconText">Χ</div>
<div class="dijitReset dijitInputField">
<input id="id_ciudad1" class="dijitReset" type="text"
waistate="haspopup-true,autocomplete-list" wairole="textbox"
dojoattachpoint="textbox,focusNode"
dojoattachevent="onkeypress:_onKeyPress,compositionend" autocomplete="off"
role="textbox" aria-haspopup="true" aria-autocomplete="list" tabindex="0"
aria-required="false" aria-invalid="true" value=""
aria-owns="id_ciudad1_popup"/>
<input type="text" style="display: none;" name="ciudad1"/>
</div>
</div>
</div>
<p class="help">Test</p>
</div>
</div>

What version of the product are you using? On what operating system?
windows xp, dojango 0.4

Please provide any additional information below.

Original link: http://code.google.com/p/dojango/issues/detail?id=22