摘要: django 的templates 判断语法是采用jinjia2的语法 语法如下 for 循环 <ul> {% for athlete in athlete_list %} <li>{{ athlete.name }}</li> {% endfor %} </ul> if 判断 {% if athl 阅读全文
posted @ 2016-02-18 15:48 zhaogaolong 阅读(282) 评论(0) 推荐(0)
摘要: django models的代码 class Group(models.Model): name = models.CharField(max_length=64) def __unicode__(self): return self.name class Host(models.Model): h 阅读全文
posted @ 2016-02-18 13:54 zhaogaolong 阅读(290) 评论(0) 推荐(0)