summaryrefslogtreecommitdiff
path: root/week-7/Final4/blog/views/newpost_template.html
diff options
context:
space:
mode:
Diffstat (limited to 'week-7/Final4/blog/views/newpost_template.html')
-rw-r--r--week-7/Final4/blog/views/newpost_template.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/week-7/Final4/blog/views/newpost_template.html b/week-7/Final4/blog/views/newpost_template.html
new file mode 100644
index 0000000..bd67f9c
--- /dev/null
+++ b/week-7/Final4/blog/views/newpost_template.html
@@ -0,0 +1,29 @@
+<!doctype HTML>
+<html>
+<head>
+<title>Create a new post</title>
+</head>
+<body>
+
+{% if username %}
+Welcome {{username}} <a href="/logout">Logout</a><p>
+{% else %}
+You are not logged in! <a href="/login">Login</a> | <a href="/signup">Sign Up</a><p>
+{% endif %}
+<a href="/">Blog Home</a><br><br>
+
+<form action="/newpost" method="POST">
+{{errors}}
+<h2>Title</h2>
+<input type="text" name="subject" size="120" value="{{subject}}"><br>
+<h2>Blog Entry<h2>
+<textarea name="body" cols="120" rows="20">{{body}}</textarea><br>
+<h2>Tags</h2>
+Comma separated, please<br>
+<input type="text" name="tags" size="120" value="{{tags}}"><br>
+<p>
+<input type="submit" value="Submit">
+
+</body>
+</html>
+