Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-submissions
Overview
Overview
Details
Activity
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
edx
edx-submissions
Commits
0ce0b454
Commit
0ce0b454
authored
Sep 13, 2015
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert to OneToOneField.
parent
9d0052a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletions
+20
-1
submissions/migrations/0002_auto_20150912_1657.py
+19
-0
submissions/models.py
+1
-1
No files found.
submissions/migrations/0002_auto_20150912_1657.py
0 → 100644
View file @
0ce0b454
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'submissions'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'scoresummary'
,
name
=
'student_item'
,
field
=
models
.
OneToOneField
(
to
=
'submissions.StudentItem'
),
),
]
submissions/models.py
View file @
0ce0b454
...
...
@@ -227,7 +227,7 @@ class Score(models.Model):
class
ScoreSummary
(
models
.
Model
):
"""Running store of the highest and most recent Scores for a StudentItem."""
student_item
=
models
.
ForeignKey
(
StudentItem
,
unique
=
True
)
student_item
=
models
.
OneToOneField
(
StudentItem
)
highest
=
models
.
ForeignKey
(
Score
,
related_name
=
"+"
)
latest
=
models
.
ForeignKey
(
Score
,
related_name
=
"+"
)
...
...
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