-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdjango.html
36 lines (33 loc) · 2.02 KB
/
django.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<title>Django</title>
<meta charset="UTF-8">
<link href="./css/stylesheet.css" rel="stylesheet">
</head>
<body>
<section>
<h1>Django</h1>
<p>Django is a web framework that has its own templating system.</p>
<h2>Code Sample</h2>
<div class="code_sample">
<code>
<pre><span class="token">{%</span> <span class="key_word">extends</span> <span class="code">"base_generic.html"</span> <span class="token">%}</span>
<span class="token">{%</span> <span class="key_word">block</span> <span class="code">title</span> <span class="token">%}{{</span> <span class="code">section.title</span> <span class="token">}}{%</span> <span class="key_word">endblock</span> <span class="token">%}</span>
<span class="token">{%</span> <span class="key_word">block</span> <span class="code">content</span> <span class="token">%}</span>
<h1><span class="token">{{</span> <span class="code">section.title</span> <span class="token">}}</span></h1>
<span class="token">{%</span> <span class="key_word">for</span> <span class="code">story</span> <span class="key_word">in</span> <span class="code">story_list</span> <span class="token">%}</span>
<h2>
<a href="<span class="token">{{</span> <span class="code">story.get_absolute_url</span> <span class="token">}}</span>">
<span class="token">{{</span> <span class="code">story.headline</span>|<span class="key_word">upper</span> <span class="token">}}</span>
</a>
</h2>
<p><span class="token">{{</span> <span class="code">story.tease</span>|<span class="key_word">truncatewords</span><span class="code">:"100"</span> <span class="token">}}</span></p>
<span class="token">{%</span> <span class="key_word">endfor</span> <span class="token">%}</span>
<span class="token">{%</span> <span class="key_word">endblock</span> <span class="token">%}</span></pre>
</code>
</div>
</section>
<script data-main="js/main" src="js/require.js"></script>
</body>
</html>