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

Edited the template for the Add New Assignment Page

parent af90e4c6
assignment-add.html {% extends 'base.html' %}
\ No newline at end of file
{% 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 {% extends 'base.html' %}
\ No newline at end of file \ No newline at end of file
assignment-edit.html {% extends 'base.html' %}
\ No newline at end of file \ No newline at end of file
Assignments.html {% extends 'base.html' %}
\ No newline at end of file \ No newline at end of file
...@@ -15,12 +15,7 @@ class AssignmentDetails(DetailView): ...@@ -15,12 +15,7 @@ class AssignmentDetails(DetailView):
class AssignmentAdd(CreateView): class AssignmentAdd(CreateView):
model = Assignment model = Assignment
template_name = 'assignments/assignment-add.html' template_name = 'assignments/assignment-add.html'
fields = [ fields = ['name', 'description', 'course', 'perfect_score',]
'name',
'description',
'course',
'perfect_score',
]
class AssignmentEdit(UpdateView): class AssignmentEdit(UpdateView):
model = Assignment 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