Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
aeae53ea
Commit
aeae53ea
authored
May 23, 2022
by
Mario Franco C. Deuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated views.py and fixed template files and added image.
parent
bbb1efd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
36 deletions
+6
-36
post_detail.html
widget_Francoconuts/forum/templates/Forum/post_detail.html
+5
-2
post_list.html
widget_Francoconuts/forum/templates/Forum/post_list.html
+1
-1
views.py
widget_Francoconuts/forum/views.py
+0
-33
hypers.jpg
..._Francoconuts/widget_Francoconuts/static/forum/hypers.jpg
+0
-0
No files found.
widget_Francoconuts/forum/templates/Forum/post_detail.html
View file @
aeae53ea
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
</h1>
</h1>
<h4>
<h4>
{{post.
post_author.first_name}} {{post.post_
author.last_name}}, {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
{{post.
author.first_name}} {{post.
author.last_name}}, {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
</h4>
</h4>
<h3>
<h3>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<li>
<li>
<u>
<u>
Reply by {{reply.
reply_author.first_name}} {{reply.reply_
author.last_name}} dated {{reply.pub_date.day}}/{{reply.pub_date.month}}/{{reply.pub_date.year}}:
Reply by {{reply.
author.first_name}} {{reply.
author.last_name}} dated {{reply.pub_date.day}}/{{reply.pub_date.month}}/{{reply.pub_date.year}}:
</u>
</u>
<br>
<br>
{{reply.reply_body}}
{{reply.reply_body}}
...
@@ -32,4 +32,7 @@
...
@@ -32,4 +32,7 @@
{% endfor %}
{% endfor %}
{% load static %}
<img
src=
"{% static 'forum/hypers.jpg' %}"
alt=
"image"
>
</ul>
</ul>
widget_Francoconuts/forum/templates/Forum/post_list.html
View file @
aeae53ea
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<h3>
<h3>
<li>
<li>
<a
href =
"{% url 'forum:forum-detail' post.id %}"
>
{{post.post_title}}
</a>
<a
href =
"{% url 'forum:forum-detail' post.id %}"
>
{{post.post_title}}
</a>
<br>
by {{post.
post_author.first_name}} {{post.post_
author.last_name}} dated {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
<br>
by {{post.
author.first_name}} {{post.
author.last_name}} dated {{post.pub_date.day}}/{{post.pub_date.month}}/{{post.pub_date.year}}
</li>
</li>
</h3>
</h3>
...
...
widget_Francoconuts/forum/views.py
View file @
aeae53ea
...
@@ -6,39 +6,6 @@ from django.views.generic.detail import DetailView
...
@@ -6,39 +6,6 @@ from django.views.generic.detail import DetailView
from
django.views.generic.list
import
ListView
from
django.views.generic.list
import
ListView
from
.forms
import
PostForm
from
.forms
import
PostForm
#def get_reply():
#
# text=''
# for reply in Reply.objects.all():
# text += (
# 'Reply by {} {} '.format(reply.author.first_name,
# reply.author.last_name)
# + 'dated {}').format(reply.pub_date.strftime('%x')
# + ':<br>'
# + '{}<br>'.format(reply.reply_body)
# )
# return text
#
#def forum(request):
#
# text = '<h1>FORUM POSTS:</h1>'
#
# for post in Post.objects.all():
# text += (
# '{} '.format(post.post_title)
# + 'by {} {} '.format(post.author.first_name,
# post.author.last_name)
# + 'dated {}').format(post.pub_date.strftime('%x')
# + ':<br>'
# + '{}<br>'.format(post.post_body)
# + get_reply()
# + '<br>'
# )
#
# return HttpResponse(text)
class
ForumListView
(
ListView
):
class
ForumListView
(
ListView
):
model
=
Post
model
=
Post
ordering
=
[
"-pub_date"
]
ordering
=
[
"-pub_date"
]
...
...
widget_Francoconuts/widget_Francoconuts/static/forum/hypers.jpg
0 → 100644
View file @
aeae53ea
120 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment