Commit 85fd4017 authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

Merge branch 'assignmentsv2' into 'main'

Compatability update: Assignmentsv2

See merge request !17
parents e0b4fc46 8a9bef62
body { body {
background-color:rgb(167, 36, 75) background-color:rgb(167, 36, 75);
} }
div.pageTitle{ div.heading{
text-align: center; text-align: center;
background-color: rgb(214, 255, 246); background-color: rgb(214, 255, 246);
margin-left: 20%; margin-left: 20%;
margin-right: 20%; margin-right: 20%;
margin-bottom: 2cm;
padding-top: 10px; padding-top: 10px;
padding-bottom: 15px; padding-bottom: 15px;
padding-left: 20px;
padding-right: 20px;
border-radius: 0.5cm; border-radius: 0.5cm;
border-width: 15px; border-width: 15px;
...@@ -18,8 +21,6 @@ div.pageTitle{ ...@@ -18,8 +21,6 @@ div.pageTitle{
box-shadow: 0px 20px 40px 0px rgb(65, 2, 23), box-shadow: 0px 20px 40px 0px rgb(65, 2, 23),
0px 0px 40px 0px rgb(175, 212, 204) inset; 0px 0px 40px 0px rgb(175, 212, 204) inset;
} }
h1.pageTitle{ h1.pageTitle{
...@@ -44,19 +45,19 @@ div.content{ ...@@ -44,19 +45,19 @@ div.content{
box-shadow: 0px 20px 40px 0px rgb(65, 2, 23); box-shadow: 0px 20px 40px 0px rgb(65, 2, 23);
} }
li{ li {
background-color: rgb(214, 255, 246); background-color: rgb(214, 255, 246);
font-size: 14pt; font-size: 14pt;
transition: all 0.5s; transition: all 0.5s;
} }
li:hover{ li:hover {
background-color: rgb(255, 209, 228); background-color: rgb(255, 209, 228);
font-size: 20pt; font-size: 20pt;
transition: all 0.5s; transition: all 0.5s;
} }
div.navButtons{ div.navigation {
background-color: rgb(255, 248, 238); background-color: rgb(255, 248, 238);
border-radius: 5px; border-radius: 5px;
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block webTitle %} Add Assignment {% endblock %} {% block style %} {% static 'assignments/frontEnd.css' %} {% endblock %}
{% block pageTitle %} Add a new assignment {% endblock %} {% block title %} Add Assignment {% endblock %}
{% block heading %} <h1 class="pageTitle"> Add a new assignment </h1>{% endblock %}
{% block content %} {% block content %}
<form id="addAssignment" method="post"> <form id="addAssignment" method="post">
...@@ -13,6 +16,6 @@ ...@@ -13,6 +16,6 @@
</form> </form>
{% endblock %} {% endblock %}
{% block otherButtons %} {% block navigation %}
<button class="buttonLink" form="addAssignment" onclick="window.location.href='assignments/';"> <b> Add assignment </b> </button> <button class="buttonLink" form="addAssignment" onclick="window.location.href='assignments/';"> <b> Add assignment </b> </button>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block webTitle %} {{object.assignment_name}} {% endblock %} {% block style %} {% static 'assignments/frontEnd.css' %} {% endblock %}
{% block pageTitle %} {{object.assignment_name}} {% endblock %} {% block title %} {{object.assignment_name}} {% endblock %}
{% block heading %} <h1 class="pageTitle"> {{object.assignment_name}} </h1> {% endblock %}
{% block content %} {% block content %}
<h2> {{object.course}} - {{object.section}} </h2> <h2> {{object.course}} - {{object.section}} </h2>
...@@ -12,6 +15,6 @@ ...@@ -12,6 +15,6 @@
</p> </p>
{% endblock %} {% endblock %}
{% block otherButtons %} {% block navigation %}
<button class="buttonLink" onclick="window.location.href='../../{{ object.get_absolute_url }}/edit';"> <b>Edit Assignment</b> </button> <button class="buttonLink" onclick="window.location.href='../../{{ object.get_absolute_url }}/edit';"> <b>Edit Assignment</b> </button>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block webTitle %} Edit Assignment {% endblock %} {% block style %} {% static 'assignments/frontEnd.css' %} {% endblock %}
{% block pageTitle %} Edit Assignment {% endblock %} {% block title %} Edit Assignment {% endblock %}
{% block heading %} <h1 class="pageTitle"> Edit Assignment </h1> {% endblock %}
{% block content %} {% block content %}
<form id="editAssignment" method="post"> <form id="editAssignment" method="post">
...@@ -13,6 +16,6 @@ ...@@ -13,6 +16,6 @@
</form> </form>
{% endblock %} {% endblock %}
{% block otherButtons %} {% block navigation %}
<button class="buttonLink" form="editAssignment" onclick="window.location.href='assignments/';"> <b>Save changes to assignment</b> </button> <button class="buttonLink" form="editAssignment" onclick="window.location.href='assignments/';"> <b>Save changes to assignment</b> </button>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block webTitle %} Widget's Assignments {% endblock %} {% block style %} {% static 'assignments/frontEnd.css' %} {% endblock %}
{% block pageTitle %} Welcome to Widget's assignments {% endblock %} {% block title %} Widget's Assignments {% endblock %}
{% block heading %} <h1 class="pageTitle"> Welcome to Widget's assignments </h1> {% endblock %}
{% block content %} {% block content %}
<ul style='list-style-type:square;'> <ul style='list-style-type:square;'>
...@@ -12,7 +15,7 @@ ...@@ -12,7 +15,7 @@
</ul> </ul>
{% endblock %} {% endblock %}
{% block otherButtons %} {% block navigation %}
<button class="buttonLink" onclick="window.location.href='add/';"> <b>New Assignment</b> </button><br><br> <button class="buttonLink" onclick="window.location.href='add/';"> <b>New Assignment</b> </button><br><br>
<a class="miniLink" href="/dashboard"> Dashboard </a> <br> <a class="miniLink" href="/dashboard"> Dashboard </a> <br>
<a class="miniLink" href="/announcementBoard"> Announcements </a> <br> <a class="miniLink" href="/announcementBoard"> Announcements </a> <br>
......
{% load static %}
<head>
<link rel="stylesheet" href="{% static '/makeItBeautiful.css' %}">
<title>{% block webTitle %}{% endblock %}</title>
</head>
<body>
<div class="pageTitle"> <h1 class="pageTitle"> {% block pageTitle %}{% endblock %} </h1> </div>
<br><br><br>
<div class="content">
{% block content %}{% endblock %}
<div class="navButtons">
{% block otherButtons %} {% endblock %}
</div>
</div>
</body>
\ No newline at end of file
...@@ -10,18 +10,18 @@ from .models import Assignment ...@@ -10,18 +10,18 @@ from .models import Assignment
def homeAssignmentsPage(request): def homeAssignmentsPage(request):
return render(request, 'templates/assignments.html', {"assignmentsList":Assignment.objects.all()}) #you can pass an entire list of model instances to the html return render(request, 'assignments/assignments.html', {"assignmentsList":Assignment.objects.all()}) #you can pass an entire list of model instances to the html
class AssignmentsDetailView(DetailView): class AssignmentsDetailView(DetailView):
model = Assignment model = Assignment
template_name = "templates/assignment-details.html" template_name = "assignments/assignment-details.html"
class AssignmentsUpdateView(UpdateView): class AssignmentsUpdateView(UpdateView):
model = Assignment model = Assignment
fields = ["assignment_name","description","course","perfect_score" ] fields = ["assignment_name","description","course","perfect_score" ]
template_name = "templates/assignment-edit.html" template_name = "assignments/assignment-edit.html"
success_url = "../details" success_url = "../details"
...@@ -29,7 +29,7 @@ class AssignmentsUpdateView(UpdateView): ...@@ -29,7 +29,7 @@ class AssignmentsUpdateView(UpdateView):
class AssignmentsCreateView(CreateView): class AssignmentsCreateView(CreateView):
model = Assignment model = Assignment
fields = ["assignment_name","description","course","perfect_score" ] fields = ["assignment_name","description","course","perfect_score" ]
template_name = "templates/assignment-add.html" template_name = "assignments/assignment-add.html"
def get_success_url(self): def get_success_url(self):
return reverse('assignments:assignment_details', kwargs={ #appName:pathName return reverse('assignments:assignment_details', kwargs={ #appName:pathName
......
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