码迷,mamicode.com
首页 > 编程语言 > 详细

Python web 周总结

时间:2014-10-25 17:18:12      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   for   sp   数据   div   on   

按顺序查询

order_by()    order_by(- )

下拉框默认显示

<select name="canteen_type_id" id="" class="inputCont">
{%for type in type_list%}
{% if type.sct_id == plan.canteen_type_id %}
<option value="{{type.sct_id}}"name="canteen_type_id"selected="selected">{{type.type_name}}</option>
 {% else %}
 <option value="{{type.sct_id}}"name="canteen_type_id">{{type.type_name}}</option>
{% endif %}
{%endfor%}
</select>

float 0.0 不为空的方法

{%if dish.price != none%}
<input type="text"value="{{dish.price}}" name="price"class="inputCont price">
{%else%}
<input type="text" name="price"class="inputCont price">
{%endif%}

 

数据库逻辑是解决大部分问题的关键,各个表之间是靠主外键关联的。

Python web 周总结

标签:style   blog   color   io   for   sp   数据   div   on   

原文地址:http://www.cnblogs.com/iwangzc/p/4050346.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!