Skip to content

Commit 227971b

Browse files
author
Noah Lloyd-Edelman
committed
Added a few comments.
1 parent f04037a commit 227971b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

django.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,14 @@ def DetailView(generic.DetailView):
256256

257257
### templates
258258

259+
* It's generally good to have a base.html > base_SECTION.html > section.html template system
260+
259261
````
260262
django.contrib.humanize
261263
````
262264

263265
````
264-
{% extends 'base.html' %}
266+
{% extends 'base.html' %} # must be first line of doc
265267
266268
{% block title %}
267269
{{ section.title }}
@@ -272,6 +274,16 @@ django.contrib.humanize
272274
{% story.headline|upper %}
273275
{% endfor %}
274276
{% 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 %}
275287
````
276288

277289
* an empty string is used if a variable is not found {{ var.attr }}

0 commit comments

Comments
 (0)