0
我有PHP腳本在我的Django項目,它應該從PostgreSQL基本項目,並添加到下拉菜單,但是當我使用它,那隻能說明文字PHP腳本顯示爲文本的Django
div class="hot-dept-select">
<span class="hot-dept-select__link"><u>Из <span data-departure="accusative">Москвы</span></u></span>
<div class="hot-dept-select__touch">
<script id="hot-dept-select-touch" type="text/html">
<select class="hot-dept-select__select">
<% for (var i = 0; i < items.length; i++) { %>
<option <% if (items[i].value == Global.getDepartureCity()) { %>selected="selected"<% } %>
value="<%= items[i].value %>"
data-value="<%= items[i].value %>"
><%= items[i].nominative %></option>
<% } %>
</select>
</script>
</div>
<div class="hot-dept-select__dropdown">
<div class="hot-dept-select__inner">
<script id="hot-dept-select" type="text/html">
<% for (var i = 0; i < items.length; i++) { %>
<div class="
hot-dept-select__item
<% if (i && (items[i].nominative[0] !== items[i - 1].nominative[0])) { %>
hot-dept-select__item_padded
<% } %>
">
<a href="/hot/<%= items[i].value %>" data-value="<%= items[i].value %>"><%= items[i].nominative %></a>
</div>
<% } %>
</script>
</div>
</div>
</div>
的Django 1.5.1,python 2.7
嗯,要成爲hosnest我不知道,用什麼語言寫這個腳本,我試過Django的標籤{}和{%},但與他們下降菜單是簡單的空 – gunner33
我did'nt看着它仔細地,它不是PHP。我猜想基於'for(var i = 0; i
max