Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
final_quintupoltrobol
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
Matthew Karl David P. Arpas
final_quintupoltrobol
Commits
824a8e1a
Commit
824a8e1a
authored
Mar 05, 2023
by
karin-kurusu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created admin panel for Forum's models and filled models with instances
parent
61400199
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
db.sqlite3
widget_quintupoltrobol/db.sqlite3
+0
-0
admin.cpython-310.pyc
...t_quintupoltrobol/forum/__pycache__/admin.cpython-310.pyc
+0
-0
admin.py
widget_quintupoltrobol/forum/admin.py
+14
-1
No files found.
widget_quintupoltrobol/db.sqlite3
View file @
824a8e1a
No preview for this file type
widget_quintupoltrobol/forum/__pycache__/admin.cpython-310.pyc
View file @
824a8e1a
No preview for this file type
widget_quintupoltrobol/forum/admin.py
View file @
824a8e1a
from
django.contrib
import
admin
from
django.contrib
import
admin
# Register your models here.
from
.models
import
ForumPost
,
Reply
class
ForumPostAdmin
(
admin
.
ModelAdmin
):
model
=
ForumPost
list_display
=
[
"title"
,
"body"
,
"author"
]
class
ReplyAdmin
(
admin
.
ModelAdmin
):
model
=
Reply
list_display
=
[
"body"
,
"author"
,
"forumpost"
]
admin
.
site
.
register
(
ForumPost
,
ForumPostAdmin
)
admin
.
site
.
register
(
Reply
,
ReplyAdmin
)
# Register your models here.
\ No newline at end of file
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