Commit 8b129c30 authored by Brescia Amandy's avatar Brescia Amandy

Edited the template for the Add New Assignment Page

parent af90e4c6
assignment-add.html
\ 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" enctype="multipart/form-data" action="">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save New Post">
</form>
{% endblock %}
\ No newline at end of file
assignment-details.html
\ No newline at end of file
{% extends 'base.html' %}
\ No newline at end of file
assignment-edit.html
\ No newline at end of file
{% extends 'base.html' %}
\ No newline at end of file
Assignments.html
\ No newline at end of file
{% extends 'base.html' %}
\ No newline at end of file
......@@ -15,12 +15,7 @@ class AssignmentDetails(DetailView):
class AssignmentAdd(CreateView):
model = Assignment
template_name = 'assignments/assignment-add.html'
fields = [
'name',
'description',
'course',
'perfect_score',
]
fields = ['name', 'description', 'course', 'perfect_score',]
class AssignmentEdit(UpdateView):
model = Assignment
......
<!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
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