Hi I upgrded from django 0.96 to 1.2 and know no other difference between "before" and "after" html options won't display anymore. I know this info is coming a little short, but maybe you can know what happened? Before:
After
Some code that seems exactly the same except that djagno dsipatcher was upgraded, is:
<div id="searchmain">{% include "form.html" %}</div>
And form.html
{% load i18n %}
<form action="/li" id="cse-search-box"><div><input value='{{q}}' type="text" id="searchtext" name="q" size="31" />
<input type="hidden" value='{{t}}' name="t" />
{% include "../market/categories.html" %}
{% ifequal logo "montao" %}
<select name="l" id="search_area" class="search_area"><option value=''>{% trans "Entire" %}</option>
<!--
<option id='heading2'>{% trans "name" %}</option> -->
<option id='heading2'>São Paulo</option>
<option id='heading2'>Rio de Janeiro</option>
<option id='heading2'>Espírito Santo</option>
<option id='heading2'>Minas Gerais</option>
<option id='heading2'>Paraná</option>
<option id='heading2'>Santa Catarina</option>
<option id='heading2'>Rio Grande do Sul</option>
<option id='heading2'>Bahia</option>
<option id='heading2'>Pernambuco</option>
<option id='heading2'>Ceará</option>
<option id='heading2'>Rio Grande do Norte</option>
<option id='heading2'>Amazonas</option>
<option id='heading2'>Distrito Federal</option>
<option id='heading2'>Pará</option>
<option id='heading2'>Maranhão</option>
<option id='heading2'>Goiás</option>
<option id='heading2'>Paraíba</option>
<option id='heading2'>Alagoas</option>
<option id='heading2'>Piauí</option>
<option id='heading2'>Mato Grosso</option>
<option id='heading2'>Mato Grosso do Sul</option>
<option id='heading2'>Sergipe</option>
<option id='heading2'>Rondônia</option>
<option id='heading2'>Tocantins</option>
<option id='heading2'>Acre</option>
<option id='heading2'>Amapá</option>
<option id='heading2'>Roraima</option>
</select> {% endifequal %}
<!--
<input type="hidden" id="lat" name="lat" size="35" maxlength="50" value="{{plat}}" />
<input type="hidden" id="lon" name="lon" size="35" maxlength="50" value="{{plon}}" />
-->
<input type="submit" id="searchbutton" value="{% trans "Go" %}" />
</div></form>
Updated to this and still same problem:
{% load i18n %}
<form action="/li" id="cse-search-box"><div><input value='{{q}}' type="text" id="searchtext" name="q" size="31" />
<input type="hidden" value='{{t}}' name="t" />
{% include "../market/categories.html" %}
{% ifequal logo "montao" %}
<select name="l" id="search_area" class="search_area"><option value=''>{% trans "Entire" %}</option>
<!--
<option >{% trans "name" %}</option> -->
<option >São Paulo</option>
<option >Rio de Janeiro</option>
<option >Espírito Santo</option>
<option >Minas Gerais</option>
<option >Paraná</option>
<option >Santa Catarina</option>
<option >Rio Grande do Sul</option>
<option >Bahia</option>
<option >Pernambuco</option>
<option >Ceará</option>
<option >Rio Grande do Norte</option>
<option >Amazonas</option>
<option >Distrito Federal</option>
<option >Pará</option>
开发者_运维知识库<option >Maranhão</option>
<option >Goiás</option>
<option >Paraíba</option>
<option >Alagoas</option>
<option >Piauí</option>
<option >Mato Grosso</option>
<option >Mato Grosso do Sul</option>
<option >Sergipe</option>
<option >Rondônia</option>
<option >Tocantins</option>
<option >Acre</option>
<option >Amapá</option>
<option >Roraima</option>
</select> {% endifequal %}
<!--
<input type="hidden" id="lat" name="lat" size="35" maxlength="50" value="{{plat}}" />
<input type="hidden" id="lon" name="lon" size="35" maxlength="50" value="{{plon}}" />
-->
<input type="submit" id="searchbutton" value="{% trans "Go" %}" />
</div></form>
I'll try whatever you can propose! Thanks. BTW Here is the expected output that I could paste in with no dynamics:
<div id="searchmain"> <form action="/li" id="cse-search-box"><div><input value='' type="text" id="searchtext" name="q" size="31" /> <input type="hidden" value='' name="t" /> <select name="cg" id="cat" class="search_category"> <option value='' >All</option> <option value='' style='background-color:#dcdcc3' id='cat1' >-- VEHICLES --</option> <option value='2' id='cat2' >Cars</option> <option value='3' id='cat3' >Motorcycles</option> <option value='4' id='cat4' >Accessories & Parts</option> <!--<option value='5' id='cat5' >Other vehicles</option>--> <option value='' style='background-color:#dcdcc3' id='cat6' >-- PROPERTIES --</option> <option value='7' id='cat7' >Apartments</option> <option value='8' id='cat8' >Houses</option> <option value='9' id='cat9' >Commercial properties</option> <option value='10' id='cat10' >Land</option> <option value='' style='background-color:#dcdcc3' id='cat11' >-- ELECTRONICS --</option> <option value='12' id='cat12' >Mobile phones & Gadgets</option> <option value='13' id='cat13' >TV/Audio/Video/Cameras</option> <option value='14' id='cat14' >Computers</option> <option value='' style='background-color:#dcdcc3' id='cat15' >-- HOME & PERSONAL ITEMS --</option> <option value='16' id='cat16' >Home & Garden</option> <option value='17' id='cat17' >Clothes/Watches/Accessories</option> <option value='18' id='cat18' >For Children</option> <option value='' style='background-color:#dcdcc3' id='cat19' >-- LEISURE/SPORTS/HOBBIES --</option> <option value='20' id='cat20' >Sports & Outdoors</option> <option value='21' id='cat21' >Hobby & Collectables</option> <option value='22' id='cat22' >Music/Movies/Books</option> <option value='23' id='cat23' >Pets</option> <option value='' style='background-color:#dcdcc3' id='cat24' >-- BUSINESS TO BUSINESS --</option> <option value='25' id='cat25' >Professional/Office equipment</option> <option value='26' id='cat26' >Business for sale</option> <option value='' style='background-color:#dcdcc3' id='cat27' >-- JOBS & SERVICES --</option> <option value='28' id='cat28' >Jobs</option> <option value='29' id='cat29' >Services</option> <option value='30' id='cat30' >Events & Catering</option> <option value='' style='background-color:#dcdcc3' >--</option> <option value='31' id='cat31' >Others</option> </select> <!--
<input type="hidden" id="lat" name="lat" size="35" maxlength="50" value="" /> <input type="hidden" id="lon" name="lon" size="35" maxlength="50" value="" />
--> <input type="submit" id="searchbutton" value="Go" /> </div></form> </div>
I don't know if it's realted to your issue, but you can't have 2 elements with the same id
attribute. id
has to be unique! If you need to give 2 elements the same style, that's what class
attribute is made for.
And yeah, it's possible that it's causing the problem.
精彩评论