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
2219c3fa
Commit
2219c3fa
authored
Mar 04, 2023
by
Albert Gagalac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
populated models with 3 items; Assignment and Course
parent
3826707d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
2 deletions
+59
-2
models.cpython-310.pyc
...upoltrobol/assignments/__pycache__/models.cpython-310.pyc
+0
-0
0003_assignment_passing_score_alter_course_section.py
...ons/0003_assignment_passing_score_alter_course_section.py
+33
-0
0004_remove_assignment_passing_score.py
...nments/migrations/0004_remove_assignment_passing_score.py
+17
-0
0003_assignment_passing_score_alter_course_section.cpython-310.pyc
...gnment_passing_score_alter_course_section.cpython-310.pyc
+0
-0
0004_remove_assignment_passing_score.cpython-310.pyc
...he__/0004_remove_assignment_passing_score.cpython-310.pyc
+0
-0
models.py
widget_quintupoltrobol/assignments/models.py
+9
-2
db.sqlite3
widget_quintupoltrobol/db.sqlite3
+0
-0
No files found.
widget_quintupoltrobol/assignments/__pycache__/models.cpython-310.pyc
View file @
2219c3fa
No preview for this file type
widget_quintupoltrobol/assignments/migrations/0003_assignment_passing_score_alter_course_section.py
0 → 100644
View file @
2219c3fa
# Generated by Django 4.1.7 on 2023-03-04 18:32
import
django.core.validators
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
"assignments"
,
"0002_assignment_course_delete_assignments_and_more"
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
"assignment"
,
name
=
"passing_score"
,
field
=
models
.
PositiveIntegerField
(
default
=
0
),
),
migrations
.
AlterField
(
model_name
=
"course"
,
name
=
"section"
,
field
=
models
.
CharField
(
default
=
""
,
max_length
=
3
,
unique
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
"^[a-zA-Z]*$"
,
message
=
"Only letters are allowed"
)
],
),
),
]
widget_quintupoltrobol/assignments/migrations/0004_remove_assignment_passing_score.py
0 → 100644
View file @
2219c3fa
# Generated by Django 4.1.7 on 2023-03-04 18:54
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
"assignments"
,
"0003_assignment_passing_score_alter_course_section"
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
"assignment"
,
name
=
"passing_score"
,
),
]
widget_quintupoltrobol/assignments/migrations/__pycache__/0003_assignment_passing_score_alter_course_section.cpython-310.pyc
0 → 100644
View file @
2219c3fa
File added
widget_quintupoltrobol/assignments/migrations/__pycache__/0004_remove_assignment_passing_score.cpython-310.pyc
0 → 100644
View file @
2219c3fa
File added
widget_quintupoltrobol/assignments/models.py
View file @
2219c3fa
...
...
@@ -17,6 +17,7 @@ class Course(models.Model):
class
Assignment
(
models
.
Model
):
name
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
description
=
models
.
TextField
(
default
=
""
,
max_length
=
700
)
course
=
models
.
ForeignKey
(
Course
,
on_delete
=
models
.
CASCADE
)
...
...
@@ -25,7 +26,13 @@ class Assignment(models.Model):
def
__str__
(
self
):
return
self
.
name
@
property
#
@property
def
pass_score
(
self
):
passing_score
=
self
.
perfect_score
*
(
60
/
100
)
return
passing_score
# def pass_score(self,*args, **kwargs):
# self.passing_score = self.perfect_score * (60/100)
# super(Assignment, self).save(*args, **kwargs)
\ No newline at end of file
widget_quintupoltrobol/db.sqlite3
View file @
2219c3fa
No preview for this file type
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