Created HTMLs

parent 28c14ec3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<h1>{% block header %}{% endblock %}</h1>
{% block body %}{% endblock %}
</body>
</html>
\ No newline at end of file
{%extends "base.html"%}
{%block title %}Widget's Forum{%endblock%}
{%block header %}Welcome to Widget's Forum!{%endblock %}
{%block body %}
<h2>Forum Posts:</h2>
{% for post in forum%}
<a href="{% url 'forum:forumpostdetails' post.pk%}">
{{post.title}} by {{post.author}}<br>
</a>
{%endfor%}
<br>
<a href="{%url 'forum:forumpostnew' %}">
<input type="button" value= "New Post"></a>
<br>
<br>
<a href= "{%url 'Dashboard:dashboard_view' %}">Dashboard</a><br>
<a href= "{%url 'assignments:assignments' %}">Assignments</a>
<br>
{% endblock%}
\ No newline at end of file
{%extends "base.html"%}
{%block title %}Add Post{%endblock%}
{%block header %}Add a new post:{%endblock %}
{%block body %}
<form method= "POST">
{% csrf_token %}
{{ form.as_p }}
<input type= "submit" value="Save New Post">
</form>
{% endblock%}
\ No newline at end of file
{%extends "base.html"%}
{%block title %}{{object.title}}{%endblock%}
{%block header %}{{object.title}}{%endblock %}
{%block body %}
by {{object.author.first_name}} {{object.author.last_name}}<br>
{{object.pub_datetime}}<br>
{{object.body}}<br>
<br>
<br>
POST REPLIES:
<br>
{% for reply in object.reply_set.all%}
{{reply.author}}<br>
{{reply.pub_datetime}}<br>
{{reply.body}}<br>
<br>
{%endfor%}
<a href="{%url 'forum:forumpostedit' object.pk %}">
<input type="button" value= "Edit Post"></a>
<br>
{% endblock%}
\ No newline at end of file
{%extends "base.html"%}
{%block title %}Edit Post{%endblock%}
{%block header %}Edit Post:{%endblock %}
{%block body %}
<form method= "POST">
{% csrf_token %}
{{ form.as_p }}
<input type= "submit" value="Save Changes to Post">
</form>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment