Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_vincentdjango
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
1
Merge Requests
1
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
Almira Redoble
midterm_vincentdjango
Commits
47669542
Commit
47669542
authored
Mar 06, 2023
by
Jayson Lim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated ReactionAdmin customization
parent
1afde53b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
admin.cpython-39.pyc
...django/announcementBoard/__pycache__/admin.cpython-39.pyc
+0
-0
admin.py
widget_vincentdjango/announcementBoard/admin.py
+5
-0
No files found.
widget_vincentdjango/announcementBoard/__pycache__/admin.cpython-39.pyc
View file @
47669542
No preview for this file type
widget_vincentdjango/announcementBoard/admin.py
View file @
47669542
...
@@ -23,6 +23,11 @@ class AnnouncementAdmin(admin.ModelAdmin):
...
@@ -23,6 +23,11 @@ class AnnouncementAdmin(admin.ModelAdmin):
class
ReactionAdmin
(
admin
.
ModelAdmin
):
class
ReactionAdmin
(
admin
.
ModelAdmin
):
model
=
Reaction
model
=
Reaction
list_display
=
(
'name'
,
'tally'
,
'annoucement'
)
search_fields
=
(
'name'
,
'annoucement'
)
list_filter
=
(
'name'
,
'annoucement'
)
admin
.
site
.
register
(
Announcement
,
AnnouncementAdmin
)
admin
.
site
.
register
(
Announcement
,
AnnouncementAdmin
)
admin
.
site
.
register
(
Reaction
,
ReactionAdmin
)
admin
.
site
.
register
(
Reaction
,
ReactionAdmin
)
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