-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (39 loc) · 1.37 KB
/
index.html
File metadata and controls
41 lines (39 loc) · 1.37 KB
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
37
38
39
40
41
<!DOCTYPE html>
{% autoescape true %}
<html>
<body>
<a href="/tags">See all the tags!</a>
<h2>Posts</h2>
{% for post in posts %}
<h3>Title: {{ post.title }}</h3>
<h5>Tags:
{% for tag in post.get_tags() %}
{{ tag.name }},
{% endfor %}
</h5>
<h5>{{ post.date.strftime("%d/%m/%y") }}</h5>
<p>{{ post.content }}</p>
{% for comment_key in post.comment_keys %}
<h3>Commenter: {{ comment_key.get().name }}</h3>
<!-- <h5> comment_key.date.strftime("%d/%m/%y") }}</h5> -->
<p>{{ comment_key.get().comment }}</p>
{% endfor %}
<form action="/comments" method="post">
<div>Name: <input name="name"></input></div>
<div>Comment: <textarea name="comment" rows="2" cols="40"></textarea></div>
<div><input type="hidden" name="post_url_key" value="{{ post.key.urlsafe() }}">
<div><input type="submit" value="Comment"></div>
</form>
<hr>
<!-- This is the tags form that needs to pass its params to '/tags' by 'post' -->
<!-- Your form goes here -->
<hr>
{% endfor %}
<form action="/" method="post">
<div>Title: <input name="title"></input></div>
<div>Content: <textarea name="content" rows="3" cols="60"></textarea></div>
<div><input type="submit" value="Add Post"></div>
</form>
</body>
</html>
{% endautoescape %}