浏览代码

Changing default text for form entry, using urlize filter to create clickable url

David Leonard 10 年之前
父节点
当前提交
ce6c2db839
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hackathon_starter/hackathon/templates/hackathon/yelp.html

+ 2 - 2
hackathon_starter/hackathon/templates/hackathon/yelp.html

@@ -16,7 +16,7 @@
           {% csrf_token %}
           {% load bootstrap %}
           <br>
-          <input type="text" name="location" class="form-control" placeholder="Enter a location" value="" required autofocus>
+          <input type="text" name="location" class="form-control" placeholder="Enter a location, e.g: yelp-san-francisco?" value="" required autofocus>
           <br>
           <button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
           <input type="hidden" name="submit" value="submit" />
@@ -44,7 +44,7 @@
 	                    <td>{{ key.snippet_text }}</td>
 	                    <td>{{ key.is_closed }}</td>
 	                    <td>{{ key.review_count }}</td>
-	                    <td>{{ key.url }}</td>
+	                    <td>{{ key.url |urlize }}</td>
 	    			</tr>
 	            {% endfor %}