Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_gitgud
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
Neal Luigi D. Rodriguez
midterm_gitgud
Commits
5317f0bf
Commit
5317f0bf
authored
Mar 06, 2023
by
Eury See
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified a variable name in models.py and views.py of Forum application.
parent
23908c11
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
0002_rename_reply_to_reply_forum_post.py
...Forum/migrations/0002_rename_reply_to_reply_forum_post.py
+18
-0
models.py
widget_gitgud/Forum/models.py
+1
-1
views.py
widget_gitgud/Forum/views.py
+1
-1
db.sqlite3
widget_gitgud/db.sqlite3
+0
-0
No files found.
widget_gitgud/Forum/migrations/0002_rename_reply_to_reply_forum_post.py
0 → 100644
View file @
5317f0bf
# Generated by Django 4.1.7 on 2023-03-06 05:12
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'Forum'
,
'0001_initial'
),
]
operations
=
[
migrations
.
RenameField
(
model_name
=
'reply'
,
old_name
=
'reply_to'
,
new_name
=
'forum_post'
,
),
]
widget_gitgud/Forum/models.py
View file @
5317f0bf
...
@@ -13,7 +13,7 @@ class Reply(models.Model):
...
@@ -13,7 +13,7 @@ class Reply(models.Model):
body
=
models
.
TextField
()
body
=
models
.
TextField
()
author
=
models
.
CharField
(
max_length
=
50
)
author
=
models
.
CharField
(
max_length
=
50
)
pub_datetime
=
models
.
DateTimeField
()
pub_datetime
=
models
.
DateTimeField
()
reply_to
=
models
.
ForeignKey
(
ForumPost
,
on_delete
=
models
.
CASCADE
)
forum_post
=
models
.
ForeignKey
(
ForumPost
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
body
return
self
.
body
...
...
widget_gitgud/Forum/views.py
View file @
5317f0bf
...
@@ -8,7 +8,7 @@ def index(request):
...
@@ -8,7 +8,7 @@ def index(request):
return_string
=
"<br>"
return_string
=
"<br>"
for
reply
in
Reply
.
objects
.
all
():
for
reply
in
Reply
.
objects
.
all
():
return_string
+=
'{} by {} posted {}, {}: <br> {} <br> Reply by {} posted {}, {}: <br> {}'
.
format
(
return_string
+=
'{} by {} posted {}, {}: <br> {} <br> Reply by {} posted {}, {}: <br> {}'
.
format
(
reply
.
reply_to
.
title
,
reply
.
reply_to
.
author
,
reply
.
reply_to
.
pub_datetime
.
strftime
(
"
%
m/
%
d/
%
Y"
),
reply
.
reply_to
.
pub_datetime
.
strftime
(
"
%
I:
%
M
%
p"
),
reply
.
reply_to
.
body
,
reply
.
forum_post
.
title
,
reply
.
forum_post
.
author
,
reply
.
forum_post
.
pub_datetime
.
strftime
(
"
%
m/
%
d/
%
Y"
),
reply
.
forum_post
.
pub_datetime
.
strftime
(
"
%
I:
%
M
%
p"
),
reply
.
forum_post
.
body
,
reply
.
author
,
reply
.
pub_datetime
.
strftime
(
"
%
m/
%
d/
%
Y"
),
reply
.
pub_datetime
.
strftime
(
"
%
I:
%
M
%
p"
),
reply
.
body
reply
.
author
,
reply
.
pub_datetime
.
strftime
(
"
%
m/
%
d/
%
Y"
),
reply
.
pub_datetime
.
strftime
(
"
%
I:
%
M
%
p"
),
reply
.
body
)
)
return_string
+=
"<br><br>"
return_string
+=
"<br><br>"
...
...
widget_gitgud/db.sqlite3
View file @
5317f0bf
No preview for this file type
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