Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_aguandhischipmunks
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
Adrian Lance Damalerio
midterm_aguandhischipmunks
Commits
29a9ea7c
Commit
29a9ea7c
authored
Mar 06, 2023
by
Jan Enzo Salvador
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added inlines in admin.py of forum for easier access to population of data
parent
000f0c02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
admin.py
widget_aguandhischipmunks/forum/admin.py
+2
-1
No files found.
widget_aguandhischipmunks/forum/admin.py
View file @
29a9ea7c
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
ForumPost
,
Reply
from
.models
import
ForumPost
,
Reply
class
ReplyIn
l
ine
(
admin
.
TabularInline
):
class
ReplyIn
L
ine
(
admin
.
TabularInline
):
model
=
Reply
model
=
Reply
class
ForumPostAdmin
(
admin
.
ModelAdmin
):
class
ForumPostAdmin
(
admin
.
ModelAdmin
):
model
=
ForumPost
model
=
ForumPost
list_display
=
(
"title"
,
"author"
,
"body"
,
"pub_datetime"
)
list_display
=
(
"title"
,
"author"
,
"body"
,
"pub_datetime"
)
inlines
=
[
ReplyInLine
]
class
ReplyAdmin
(
admin
.
ModelAdmin
):
class
ReplyAdmin
(
admin
.
ModelAdmin
):
...
...
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