Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group22
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
John Tamano
widget_group22
Commits
f0ec44c0
Commit
f0ec44c0
authored
Apr 05, 2022
by
Norberto Tadeo
😔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed some lines in views.py for better readability
parent
1eb7d824
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
views.cpython-39.pyc
widget_group22/forum/__pycache__/views.cpython-39.pyc
+0
-0
views.py
widget_group22/forum/views.py
+7
-3
No files found.
widget_group22/forum/__pycache__/views.cpython-39.pyc
View file @
f0ec44c0
No preview for this file type
widget_group22/forum/views.py
View file @
f0ec44c0
...
@@ -13,7 +13,10 @@ def displayForumPosts(request):
...
@@ -13,7 +13,10 @@ def displayForumPosts(request):
P_body
=
Post
.
post_body
P_body
=
Post
.
post_body
P_pub_date
=
Post
.
pub_date
P_pub_date
=
Post
.
pub_date
PostThread
=
(
"<br><font size='+1.5'> '<b>"
+
P_title
+
"</b>' by <i>"
+
str
(
Post
.
author
.
first_name
)
+
" "
+
str
(
Post
.
author
.
last_name
)
+
"</i> dated "
+
str
(
P_pub_date
)
+
": <br>"
+
P_body
+
"</font>"
)
PostThread
=
(
"<br><font size='+1.5'> '<b>"
+
P_title
+
"</b>' by <i>"
+
str
(
Post
.
author
.
first_name
)
+
" "
+
str
(
Post
.
author
.
last_name
)
+
"</i> dated "
+
str
(
P_pub_date
)
+
": <br>"
+
P_body
+
"</font>"
)
output
+=
PostThread
+
""
output
+=
PostThread
+
""
for
Reply
in
ForumReplies
:
for
Reply
in
ForumReplies
:
...
@@ -23,8 +26,9 @@ def displayForumPosts(request):
...
@@ -23,8 +26,9 @@ def displayForumPosts(request):
if
ReplytoPost
==
P_title
and
R_body
!=
NULL
:
if
ReplytoPost
==
P_title
and
R_body
!=
NULL
:
ReplyThread
=
(
ReplyThread
=
(
"<br> Reply by <i>"
+
str
(
Reply
.
author
.
first_name
)
+
" "
+
str
(
Reply
.
author
.
last_name
)
+
"</i> dated "
+
str
(
R_pub_date
)
+
": <br>"
+
"<br> Reply by <i>"
+
str
(
Reply
.
author
.
first_name
)
+
" "
+
str
(
Reply
.
author
.
last_name
)
+
R_body
)
"</i> dated "
+
str
(
R_pub_date
)
+
": <br>"
+
R_body
)
output
+=
ReplyThread
+
""
output
+=
ReplyThread
+
""
output
+=
"<br>"
output
+=
"<br>"
return
HttpResponse
(
'<h1>FORUM POSTS: </h1>'
+
output
)
return
HttpResponse
(
'<h1>FORUM POSTS: </h1>'
+
output
)
\ No newline at end of file
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