Commit 9b64c645 authored by Joan Denise Nocos's avatar Joan Denise Nocos

chore: added base.html file to assignments app, modified index and details...

chore: added base.html file to assignments app, modified index and details templates to extend base.html file
parent 8bebcf46
......@@ -23,10 +23,6 @@ p{
}
body {
background-color: white;
background-size: cover;
background-position: center;
background-attachment: fixed;
font-family: Helvetica;
}
a{
color: blue;
......@@ -34,12 +30,6 @@ a{
font-size: 20px;
font-weight: bold;
}
ol {
font-size:35px;
font-family: Helvetica;
color: black;
font-weight: bold;
}
a:link {
text-decoration: underline;
}
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css"
href="{% static 'assignments/style.css' %}">
<title>{% block page-title %}{% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
{% load static %}
{% extends "assignments/base.html" %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css"
href="{% static 'assignments/style.css' %}">
<title>{% block page-title %}Assignment {{ assignment_id }} Details{% endblock %}</title>
</head>
<body>
{% block page-title %}Assignment {{ assignment_id }} Details{% endblock %}
{% block content %}
<h1>{{ course.course_code }} {{ course.course_title }} {{ course.section }}</h1>
<h3>{{ assignment.name }}</h3>
<p>Description: {{ assignment.description }}</p>
<p>Perfect Score: {{ assignment.max_points }}</p>
<p>Passing Score: {{ assignment.passing_score }}</p>
<img src="/static/assignments/{{ assignment.file }}" width="250" height="250">
</body>
</html>
{% endblock %}
\ No newline at end of file
{% load static %}
{% extends "assignments/base.html" %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css"
href="{% static 'assignments/style.css' %}">
<title>{% block page-title %}Assignments Per Course{% endblock %}</title>
</head>
<body>
{% block page-title %}Assignments Per Course{% endblock %}
{% block content %}
<h1>Assignments Per Course</h1>
<h2>List of courses:</h2>
{% if course_list %}
......@@ -29,9 +21,4 @@
{% else %}
<p>No course available.</p>
{% endif %}
</body>
</html>
{% endblock %}
\ No newline at end of file
......@@ -16,7 +16,7 @@ def details(request, assignment_id):
try:
assignment = Assignment.objects.get(pk=assignment_id)
except Assignment.DoesNotExist:
raise Http404("Assignment does not exist!")
raise Http404("Assignment does not exist.")
score = assignment.max_points
assignment.passing_score = (score*60) // 100
......
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