Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_gitgud
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
Neal Luigi D. Rodriguez
midterm_gitgud
Commits
3336131f
Commit
3336131f
authored
Mar 03, 2023
by
Neal Luigi D. Rodriguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin panel has been created
parent
fcc5c853
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
1 deletion
+50
-1
admin.cpython-39.pyc
widget_gitgud/Assignments/__pycache__/admin.cpython-39.pyc
+0
-0
models.cpython-39.pyc
widget_gitgud/Assignments/__pycache__/models.cpython-39.pyc
+0
-0
urls.cpython-39.pyc
widget_gitgud/Assignments/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
widget_gitgud/Assignments/__pycache__/views.cpython-39.pyc
+0
-0
admin.py
widget_gitgud/Assignments/admin.py
+16
-1
0001_initial.py
widget_gitgud/Assignments/migrations/0001_initial.py
+34
-0
0001_initial.cpython-39.pyc
...nments/migrations/__pycache__/0001_initial.cpython-39.pyc
+0
-0
__init__.cpython-39.pyc
...ssignments/migrations/__pycache__/__init__.cpython-39.pyc
+0
-0
No files found.
widget_gitgud/Assignments/__pycache__/admin.cpython-39.pyc
0 → 100644
View file @
3336131f
File added
widget_gitgud/Assignments/__pycache__/models.cpython-39.pyc
View file @
3336131f
No preview for this file type
widget_gitgud/Assignments/__pycache__/urls.cpython-39.pyc
0 → 100644
View file @
3336131f
File added
widget_gitgud/Assignments/__pycache__/views.cpython-39.pyc
0 → 100644
View file @
3336131f
File added
widget_gitgud/Assignments/admin.py
View file @
3336131f
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Course
,
Assignment
# Register your models here.
# Register your models here.
class
CourseAdmin
(
admin
.
ModelAdmin
):
model
=
Course
search_fields
=
(
'code'
,
'title'
)
list_display
=
(
'code'
,
'title'
,
'section'
)
class
AssignmentAdmin
(
admin
.
ModelAdmin
):
model
=
Assignment
search_fields
=
(
'name'
,
'course'
)
list_display
=
(
'name'
,
'description'
,
'course'
,
'perfect_score'
,
'passing_score'
)
admin
.
site
.
register
(
Course
,
CourseAdmin
)
admin
.
site
.
register
(
Assignment
,
AssignmentAdmin
)
\ No newline at end of file
widget_gitgud/Assignments/migrations/0001_initial.py
0 → 100644
View file @
3336131f
# Generated by Django 3.2 on 2023-03-03 15:51
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Course'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'code'
,
models
.
CharField
(
max_length
=
10
)),
(
'title'
,
models
.
CharField
(
max_length
=
100
)),
(
'section'
,
models
.
CharField
(
max_length
=
3
)),
],
),
migrations
.
CreateModel
(
name
=
'Assignment'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
100
)),
(
'description'
,
models
.
TextField
()),
(
'perfect_score'
,
models
.
IntegerField
()),
(
'course'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
PROTECT
,
to
=
'Assignments.course'
)),
],
),
]
widget_gitgud/Assignments/migrations/__pycache__/0001_initial.cpython-39.pyc
0 → 100644
View file @
3336131f
File added
widget_gitgud/Assignments/migrations/__pycache__/__init__.cpython-39.pyc
0 → 100644
View file @
3336131f
File added
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