Commit caf00d7f authored by N1o9r4b7e9r6to's avatar N1o9r4b7e9r6to

added new objects

parents efb62581 e03813bd
h1 {
font-family: verdana;
}
body {
font-family: verdana;
background-color: hotpink;
}
\ No newline at end of file
{% extends "announcements/base.html" %}
{% load static %}
{% block title %}Announcement{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{% static 'css/style.css' %}">
{% endblock %}
{% block content %}
<h1>Announcement Board</h1>
<body>
<p>Important Announcements:</p>
<ol>
{% for announcement in all_announcements %}
<p>
<a href = {% url 'announcements:details' announcement.id %}>
{{announcement.announcement_title}} by
{{announcement.author.first_name}}
{{announcement.author.last_name}}
dated {{announcement.pub_date|date:"d/m/Y"}}</a>
</p>
{% endfor %}
</ol>
</body>
{% endblock %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{% endblock %}</title>
{% block styles %}
{% endblock %}
</head>
<body>
<div id="content">
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
</body>
</html>
{% extends "announcements/base.html" %}
{% block content %}
<h1>
{{announcement_details.announcement_title}}
</h1>
<h2>
by
{{announcement_details.author.first_name}}
{{announcement_details.author.last_name}}
dated {{announcement_details.pub_date|date:"d/m/Y"}}
</h2>
<p>
{{announcement_details.announcement_body}}
</p>
<li>Like: {{like}}</li>
<li>Love: {{love}}</li>
<li>Angry: {{angry}}</li>
<img src=http://images.gmanews.tv/webpics/2021/11/rastaman_2021_11_07_16_56_21.png>
{% endblock %}
\ No newline at end of file
......@@ -7,7 +7,7 @@ def index(request):
return HttpResponse('This is the Announcement Board!')
def announcements(request):
all_announcements = models.Announcement.objects.order_by("pub_date")
all_announcements = models.Announcement.objects.order_by("-id")
context = {
"all_announcements": all_announcements
}
......
{% block content %}
<h1>ASSIGNMENTS: </h1>
{% for assignment in assignments %}
<div class = "assignments">
<div class = "all_assignments">
<p>Assignment Name: {{ assignment.name }}</p>
<p>Description: {{ assignment.description }}</p>
<p>Perfect Score: {{ assignment.max_points }}</p>
<p>Passing Score: {{ assignment.passing_score }}</p>
<p>Course/Section: {{ assignment.course.course_code }}
{{ assignment.course.course_title }}
{{ assignment.course.section }}</p>
<br>
</div>
</div>
{% endfor %}
{% endblock %}
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>{% block title %}{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends "homepage/base.html" %}
{% block content %}
<p1>
{{widgetuserdetails.last_name}},
{{widgetuserdetails.first_name}}
......@@ -8,4 +11,6 @@
<li>{{widgetuserdetails.department.dept_name}}</li>
<li>{{widgetuserdetails.department.home_unit}}</li>
</p1>
<img src="https://thumbs.dreamstime.com/b/default-avatar-profile-vector-user-profile-default-avatar-profile-vector-user-profile-profile-179376714.jpg" style="width: 100px;height: 100px;">
\ No newline at end of file
<img src="https://thumbs.dreamstime.com/b/default-avatar-profile-vector-user-profile-default-avatar-profile-vector-user-profile-profile-179376714.jpg" style="width: 100px;height: 100px;">
{% endblock %}
\ No newline at end of file
<html>
{% extends "homepage/base.html" %}
{% block content %}
<h1>Welcome to Widget!</h1>
<p1>Widget Users:</p1>
<ol>
......@@ -8,4 +10,4 @@
</p1>
{% endfor %}
</ol>
</html>
\ No newline at end of file
{% endblock %}
\ No newline at end of file
......@@ -25,6 +25,6 @@ def displayUserDetails(request, user_id):
context = {
"widgetuserdetails" : widgetuserdetails
}
return render(request, "users/details.html", context)
return render(request, "homepage/details.html", context)
# Create your views here.
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