File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -256,12 +256,14 @@ def DetailView(generic.DetailView):
256
256
257
257
### templates
258
258
259
+ * It's generally good to have a base.html > base_SECTION.html > section.html template system
260
+
259
261
````
260
262
django.contrib.humanize
261
263
````
262
264
263
265
````
264
- {% extends 'base.html' %}
266
+ {% extends 'base.html' %} # must be first line of doc
265
267
266
268
{% block title %}
267
269
{{ section.title }}
@@ -272,6 +274,16 @@ django.contrib.humanize
272
274
{% story.headline|upper %}
273
275
{% endfor %}
274
276
{% endblock %}
277
+
278
+ {# some comment #}
279
+
280
+ {{ MODEL.FOREIGNKEY_set.all.count }}
281
+
282
+ {% if athlete_list|length > 1 %}
283
+ Team: {% for athlete in athlete_list %} ... {% endfor %}
284
+ {% else %}
285
+ Athlete: {{ athlete_list.0.name }}
286
+ {% endif %}
275
287
````
276
288
277
289
* an empty string is used if a variable is not found {{ var.attr }}
You can’t perform that action at this time.
0 commit comments