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
dc21a43d
Commit
dc21a43d
authored
Mar 30, 2022
by
Miguel Luis D. Bandelaria
Browse files
Options
Browse Files
Download
Plain Diff
Resolved cache conflicts.
parents
53a7497c
74fb222a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
admin.py
widget_group_17/forum/admin.py
+3
-2
models.py
widget_group_17/forum/models.py
+11
-1
No files found.
widget_group_17/forum/admin.py
View file @
dc21a43d
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Post
from
.models
import
Post
,
Reply
# Register your models here.
# Register your models here.
admin
.
site
.
register
(
Post
)
admin
.
site
.
register
(
Post
)
admin
.
site
.
register
(
Reply
)
\ No newline at end of file
widget_group_17/forum/models.py
View file @
dc21a43d
...
@@ -2,6 +2,16 @@ from django.db import models
...
@@ -2,6 +2,16 @@ from django.db import models
# Create your models here.
# Create your models here.
class
Post
(
models
.
Model
):
class
Post
(
models
.
Model
):
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
)
post_title
=
models
.
CharField
(
max_length
=
100
)
post_title
=
models
.
CharField
(
max_length
=
100
)
post_body
=
models
.
CharField
(
max_length
=
1000
)
post_body
=
models
.
CharField
(
max_length
=
1000
)
<<<<<<<
HEAD
pub_date
=
models
.
DateTimeField
(
"Date published"
)
pub_date
=
models
.
DateTimeField
(
"Date published"
)
=======
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"
)
>>>>>>>
bandelaria
/
forum
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