Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group17
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
Vaughn Nephi Fajardo
widget_group17
Commits
74fb222a
Commit
74fb222a
authored
Mar 30, 2022
by
Miguel Luis D. Bandelaria
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added the Reply model and registered it to Django admin
parent
200e09d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
models.cpython-39.pyc
widget_group_17/forum/__pycache__/models.cpython-39.pyc
+0
-0
admin.py
widget_group_17/forum/admin.py
+3
-2
models.py
widget_group_17/forum/models.py
+6
-0
settings.cpython-39.pyc
...up_17/widget_group_17/__pycache__/settings.cpython-39.pyc
+0
-0
No files found.
widget_group_17/forum/__pycache__/models.cpython-39.pyc
View file @
74fb222a
No preview for this file type
widget_group_17/forum/admin.py
View file @
74fb222a
from
django.contrib
import
admin
from
.models
import
Post
from
.models
import
Post
,
Reply
# Register your models here.
admin
.
site
.
register
(
Post
)
\ No newline at end of file
admin
.
site
.
register
(
Post
)
admin
.
site
.
register
(
Reply
)
\ No newline at end of file
widget_group_17/forum/models.py
View file @
74fb222a
...
...
@@ -2,6 +2,12 @@ from django.db import models
# Create your models here.
class
Post
(
models
.
Model
):
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
)
post_title
=
models
.
CharField
(
max_length
=
100
)
post_body
=
models
.
CharField
(
max_length
=
1000
)
pub_date
=
models
.
DateTimeField
(
"Date published"
)
class
Reply
(
models
.
Model
):
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
)
reply_body
=
models
.
CharField
(
max_length
=
1000
)
pub_date
=
models
.
DateTimeField
(
"Replied on"
)
\ No newline at end of file
widget_group_17/widget_group_17/__pycache__/settings.cpython-39.pyc
View file @
74fb222a
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