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
b24cab4e
Commit
b24cab4e
authored
Mar 05, 2023
by
Deokhyun Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
admin panel for the model: course; assignment is finished
parent
43416390
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
admin.cpython-310.pyc
...ischipmunks/assignments/__pycache__/admin.cpython-310.pyc
+0
-0
admin.py
widget_aguandhischipmunks/assignments/admin.py
+13
-2
No files found.
widget_aguandhischipmunks/assignments/__pycache__/admin.cpython-310.pyc
View file @
b24cab4e
No preview for this file type
widget_aguandhischipmunks/assignments/admin.py
View file @
b24cab4e
from
django.contrib
import
admin
from
.models
import
Course
,
Assignment
# admin panel for Course model
class
CourseAdmin
(
admin
.
ModelAdmin
):
model
=
Course
list_display
=
(
'code'
,
'title'
,
'section'
)
search_fields
=
(
'code'
,
'title'
,
'section'
)
list_filter
=
(
'code'
,
'title'
,
'section'
)
class
Assignment
(
admin
.
ModelAdmin
):
# admin panel for Assignment model
class
Assignment
Admin
(
admin
.
ModelAdmin
):
model
=
Assignment
list_display
=
(
'name'
,
'description'
,
'course'
,
'perfect_score'
,
'passing_score'
)
search_fields
=
(
'name'
,
'description'
,
'course'
)
list_filter
=
(
'name'
,
'description'
,
'course'
,
'perfect_score'
)
admin
.
site
.
register
(
Course
,
CourseAdmin
)
admin
.
site
.
register
(
Assignment
,
AssignmentAdmin
)
\ 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