Added sorting by pub_datetime

parent 7ad4a0f8
......@@ -14,6 +14,7 @@ March 6, 2023;
This is to certify that this project was made in whole by our group, which
is composed of Joaquin Crisologo, Andrew Idquival, Jayson Lim, Almira Redoble
and Neptune Sy.;
https://www.w3schools.com/html/html_css.asp
https://www.w3schools.com/html/html_styles.asp
https://github.com/github/gitignore/blob/main/Python.gitignore;
......@@ -22,6 +23,7 @@ https://www.w3docs.com/snippets/html/how-to-create-an-html-button-that-acts-like
https://stackoverflow.com/questions/44492393/how-to-add-custom-styling-to-forms-created-with-django-createview
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Breadcrumb_Navigation
https://stackoverflow.com/questions/6540032/sorting-related-items-in-a-django-template
(sgd) Joaquin Crisologo, 7 May, 2023
(sgd) Andrew Idquival, 28 February, 2023
......
......@@ -8,7 +8,7 @@
{% block content %}
<h2> Forum Posts: </h2>
<ul>
{% for forumpost in forumposts %}
{% for forumpost in forumposts|dictsortreversed:"pub_datetime" %}
<li>
<a href="{{ forumpost.get_absolute_url }}"> {{ forumpost.title }} by {{ forumpost.author.first_name }} {{ forumpost.author.last_name }} </a>
</li>
......
<!DOCTYPE html>
<html lang="en">
<head>
{% load static %}
<meta charset="utf-8">
<link rel="stylesheet" href="{% block style %}{% endblock %}">
<title>{% block title %}{% endblock %}</title>
......
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