Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 23
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
Bianca Aguilar
widget_group 23
Commits
fa94d592
Commit
fa94d592
authored
Apr 05, 2022
by
Bianca Aguilar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited Forum view so that it could allow multiple replies
parent
24e86a9b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
README.md
README.md
+4
-0
db.sqlite3
db.sqlite3
+0
-0
views.cpython-310.pyc
forum/__pycache__/views.cpython-310.pyc
+0
-0
views.py
forum/views.py
+3
-3
No files found.
README.md
View file @
fa94d592
...
...
@@ -3,6 +3,10 @@
+
Homepage (Lab 1)
+
Forum (Lab 1)
+
Forum Models (Lab 2)
+
Forum Models (Midterm)
+
Forum View (Midterm)
+
Announcements Models (Midterm)
+
Announcements View (Midterm)
**Alissandra Tanaliga:**
+
Announcements (Lab 1)
...
...
db.sqlite3
View file @
fa94d592
No preview for this file type
forum/__pycache__/views.cpython-310.pyc
View file @
fa94d592
No preview for this file type
forum/views.py
View file @
fa94d592
...
...
@@ -8,10 +8,10 @@ def index(request):
final_list
=
''
for
p
in
range
(
len
(
Post
.
objects
.
all
())):
final_list
+=
'{}'
.
format
(
Post
.
objects
.
get
(
pk
=
p
+
1
)
.
post_detail
)
reply_list
=
list
(
Reply
.
objects
.
filter
(
post
=
Post
.
objects
.
get
(
pk
=
p
+
1
)))
reply_list
=
list
(
Reply
.
objects
.
filter
(
post
__exact
=
Post
.
objects
.
get
(
pk
=
p
+
1
)))
for
r
in
range
(
len
(
reply_list
)):
final_list
+=
'{}'
.
format
(
Reply
.
objects
.
get
(
post__exact
=
Post
.
objects
.
get
(
pk
=
p
+
1
))
.
reply_detail
)
final_list
+=
'{}'
.
format
(
reply_list
[
r
]
.
reply_detail
)
final_list
+=
'<br>'
return
final_list
...
...
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