Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_father when can i be on my own i have the hello world to see
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
father when can i be on my own i have the hello world to see
widget_father when can i be on my own i have the hello world to see
Commits
5cddc09f
Verified
Commit
5cddc09f
authored
May 17, 2022
by
Angelo Esteban
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed passing_score field for assignments on the admin page
parent
6369fd8c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
admin.py
assignments/admin.py
+3
-1
0008_alter_assignment_passing_score.py
...gnments/migrations/0008_alter_assignment_passing_score.py
+18
-0
models.py
assignments/models.py
+1
-1
No files found.
assignments/admin.py
View file @
5cddc09f
...
...
@@ -5,7 +5,9 @@ from .models import Course
class
AssignmentAdmin
(
admin
.
ModelAdmin
):
readonly_fields
=
(
'id'
,)
readonly_fields
=
(
'passing_score'
,
'id'
,)
fields
=
(
'name'
,
'description'
,
'max_points'
,
'passing_score'
,
'image'
)
fields
+=
(
'id'
,)
class
CourseAdmin
(
admin
.
ModelAdmin
):
...
...
assignments/migrations/0008_alter_assignment_passing_score.py
0 → 100644
View file @
5cddc09f
# Generated by Django 4.0.3 on 2022-05-17 21:39
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'assignments'
,
'0007_alter_assignment_image'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'assignment'
,
name
=
'passing_score'
,
field
=
models
.
IntegerField
(
default
=
6
,
editable
=
False
),
),
]
assignments/models.py
View file @
5cddc09f
...
...
@@ -7,7 +7,7 @@ class Assignment(models.Model):
name
=
models
.
CharField
(
max_length
=
120
)
description
=
models
.
TextField
(
blank
=
True
)
max_points
=
models
.
IntegerField
(
default
=
10
)
passing_score
=
models
.
IntegerField
(
default
=
6
)
passing_score
=
models
.
IntegerField
(
default
=
6
,
editable
=
False
)
image
=
models
.
ImageField
(
null
=
True
,
blank
=
True
,
upload_to
=
images_dir
)
def
save
(
self
,
*
args
,
**
kwargs
):
...
...
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