added templates for ListView and DetailView

parent 6bd4b3c8
{% extends 'base.html' %}
{% block styles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
{% endblock %}
{% block title %}
{{assignment.name}}
{% endblock %}
{% block content %}
<h2>Assignment Details</h2>
Course: {{assignment.course.code}} {{assignment.course.title}} {{assignment.course.section}}<br>
Name: {{assignment.name}}<br>
Description: {% if assignment.description != None and assignment.description != '' %}{{ assignment.description }}{% else %}No description provided.{% endif %}<br>
Perfect score: {{assignment.max_points}}<br>
Passing score: {{assignment.passing_score}}<br>
Image: <br>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block styles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
{% endblock %}
{% block title %}Assignments{% endblock %}
{% block content %}
<h1>Assignments Per Course</h1>
<p>List of courses:</p>
<ul>
{% for course in all_courses %}
<li>{{course.code}} {{course.title}} {{course.section}}</li>
<ul>
{% for assignment in course.assignment_set.all %}
<a href='{{request.path}}{{assignment.pk}}/details'><li>{{assignment.name}}</li></a>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% 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